We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 826788d commit 5e998f6Copy full SHA for 5e998f6
1 file changed
tokio-postgres-native-tls/src/lib.rs
@@ -12,12 +12,12 @@ mod test;
12
13
#[cfg(feature = "runtime")]
14
#[derive(Clone)]
15
-pub struct MakeTlsConnector(tokio_tls::TlsConnector);
+pub struct MakeTlsConnector(native_tls::TlsConnector);
16
17
18
impl MakeTlsConnector {
19
pub fn new(connector: native_tls::TlsConnector) -> MakeTlsConnector {
20
- MakeTlsConnector(tokio_tls::TlsConnector::from(connector))
+ MakeTlsConnector(connector)
21
}
22
23
@@ -31,10 +31,7 @@ where
31
type Error = native_tls::Error;
32
33
fn make_tls_connect(&mut self, domain: &str) -> Result<TlsConnector, native_tls::Error> {
34
- Ok(TlsConnector {
35
- connector: self.0.clone(),
36
- domain: domain.to_string(),
37
- })
+ Ok(TlsConnector::new(self.0.clone(), domain))
38
39
40
0 commit comments