Skip to content

Commit 281a1bc

Browse files
committed
Re-order impls for HttpsConnector
1 parent 3883ec9 commit 281a1bc

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

src/connector.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,6 @@ impl<T> HttpsConnector<T> {
3333
}
3434
}
3535

36-
impl<T> fmt::Debug for HttpsConnector<T> {
37-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
38-
f.debug_struct("HttpsConnector")
39-
.field("force_https", &self.force_https)
40-
.finish()
41-
}
42-
}
43-
44-
impl<H, C> From<(H, C)> for HttpsConnector<H>
45-
where
46-
C: Into<Arc<rustls::ClientConfig>>,
47-
{
48-
fn from((http, cfg): (H, C)) -> Self {
49-
Self {
50-
force_https: false,
51-
http,
52-
tls_config: cfg.into(),
53-
override_server_name: None,
54-
}
55-
}
56-
}
57-
5836
impl<T> Service<Uri> for HttpsConnector<T>
5937
where
6038
T: Service<Uri>,
@@ -139,3 +117,25 @@ where
139117
}
140118
}
141119
}
120+
121+
impl<H, C> From<(H, C)> for HttpsConnector<H>
122+
where
123+
C: Into<Arc<rustls::ClientConfig>>,
124+
{
125+
fn from((http, cfg): (H, C)) -> Self {
126+
Self {
127+
force_https: false,
128+
http,
129+
tls_config: cfg.into(),
130+
override_server_name: None,
131+
}
132+
}
133+
}
134+
135+
impl<T> fmt::Debug for HttpsConnector<T> {
136+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
137+
f.debug_struct("HttpsConnector")
138+
.field("force_https", &self.force_https)
139+
.finish()
140+
}
141+
}

0 commit comments

Comments
 (0)