File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " r2d2_postgres"
3- version = " 0.9.2 "
3+ version = " 0.9.3 "
44authors = [" Steven Fackler <sfackler@gmail.com>" ]
55license = " MIT"
66description = " Postgres support for the r2d2 connection pool"
77repository = " https://github.com/sfackler/r2d2-postgres"
8- documentation = " https://sfackler.github.io/r2d2-postgres/doc/v0.9.2 /r2d2_postgres"
8+ documentation = " https://sfackler.github.io/r2d2-postgres/doc/v0.9.3 /r2d2_postgres"
99keywords = [" postgres" , " sql" , " pool" , " database" ]
1010
1111[lib ]
@@ -19,4 +19,4 @@ path = "tests/test.rs"
1919
2020[dependencies ]
2121r2d2 = " 0.6"
22- postgres = " 0.9 "
22+ postgres = " 0.10 "
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ r2d2-postgres
33
44[ ![ Build Status] ( https://travis-ci.org/sfackler/r2d2-postgres.svg?branch=master )] ( https://travis-ci.org/sfackler/r2d2-postgres )
55
6- [ rust-postgres ] ( https://github.com/sfackler/rust -postgres ) support library for the [ r2d2 ] ( https://github.com/sfackler/r2d2 ) connection pool.
6+ [ Documentation ] ( https://sfackler. github.io/r2d2 -postgres/doc/v0.9.3/r2d2_postgres )
77
8- Documentation is available at https://sfackler. github.io/r2d2 -postgres/doc/v0.9.2/r2d2_postgres
8+ [ rust-postgres ] ( https://github.com/sfackler/rust -postgres ) support library for the [ r2d2 ] ( https://github.com/sfackler/r2d2 ) connection pool.
99
1010# Example
1111
Original file line number Diff line number Diff line change 11//! Postgres support for the `r2d2` connection pool.
2- #![ doc( html_root_url="https://sfackler.github.io/r2d2-postgres/doc/v0.9.2 " ) ]
2+ #![ doc( html_root_url="https://sfackler.github.io/r2d2-postgres/doc/v0.9.3 " ) ]
33#![ warn( missing_docs) ]
44extern crate r2d2;
55extern crate postgres;
@@ -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 }
You can’t perform that action at this time.
0 commit comments