diff --git a/postgres-native-tls/Cargo.toml b/postgres-native-tls/Cargo.toml index 28e8d140..ada50ccf 100644 --- a/postgres-native-tls/Cargo.toml +++ b/postgres-native-tls/Cargo.toml @@ -4,6 +4,6 @@ version = "0.1.0" authors = ["Steven Fackler "] [dependencies] -native-tls = "0.1" +native-tls = "0.2" postgres = { version = "0.15", path = "../postgres" } diff --git a/postgres-native-tls/src/lib.rs b/postgres-native-tls/src/lib.rs index 8dacdef2..2e2f0457 100644 --- a/postgres-native-tls/src/lib.rs +++ b/postgres-native-tls/src/lib.rs @@ -22,7 +22,7 @@ impl Debug for NativeTls { impl NativeTls { pub fn new() -> Result { - let connector = TlsConnector::builder()?.build()?; + let connector = TlsConnector::builder().build()?; Ok(NativeTls::with_connector(connector)) } diff --git a/postgres-native-tls/src/test.rs b/postgres-native-tls/src/test.rs index 79704466..fae5fd9b 100644 --- a/postgres-native-tls/src/test.rs +++ b/postgres-native-tls/src/test.rs @@ -8,8 +8,8 @@ fn connect() { let cert = include_bytes!("../../test/server.crt"); let cert = Certificate::from_pem(cert).unwrap(); - let mut builder = TlsConnector::builder().unwrap(); - builder.add_root_certificate(cert).unwrap(); + let mut builder = TlsConnector::builder(); + builder.add_root_certificate(cert); let connector = builder.build().unwrap(); let handshake = NativeTls::with_connector(connector);