Skip to content

Commit 7e94295

Browse files
committed
Update to postgres 0.10
1 parent 39221c8 commit 7e94295

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ path = "tests/test.rs"
1919

2020
[dependencies]
2121
r2d2 = "0.6"
22-
postgres = "0.9"
22+
postgres = "0.10"

src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,13 @@ impl PostgresConnectionManager {
8484
/// types.
8585
pub fn new<T: IntoConnectParams>(params: T, ssl_mode: SslMode)
8686
-> 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+
8792
Ok(PostgresConnectionManager {
88-
params: try!(params.into_connect_params()),
93+
params: params,
8994
ssl_mode: ssl_mode,
9095
})
9196
}

0 commit comments

Comments
 (0)