We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39221c8 commit 7e94295Copy full SHA for 7e94295
Cargo.toml
@@ -19,4 +19,4 @@ path = "tests/test.rs"
19
20
[dependencies]
21
r2d2 = "0.6"
22
-postgres = "0.9"
+postgres = "0.10"
src/lib.rs
@@ -84,8 +84,13 @@ impl PostgresConnectionManager {
84
/// types.
85
pub fn new<T: IntoConnectParams>(params: T, ssl_mode: SslMode)
86
-> Result<PostgresConnectionManager, postgres::error::ConnectError> {
87
+ let params = match params.into_connect_params() {
88
+ Ok(params) => params,
89
+ Err(err) => return Err(postgres::error::ConnectError::BadConnectParams(err)),
90
+ };
91
+
92
Ok(PostgresConnectionManager {
- params: try!(params.into_connect_params()),
93
+ params: params,
94
ssl_mode: ssl_mode,
95
})
96
}
0 commit comments