File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -18,5 +18,5 @@ name = "test"
1818path = " tests/test.rs"
1919
2020[dependencies ]
21- r2d2 = " 0.4 "
21+ r2d2 = " 0.5 "
2222postgres = " 0.6"
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ extern crate postgres;
33extern crate r2d2;
44extern crate r2d2_postgres;
55
6- use std:: default:: Default ;
76use std:: sync:: { Arc , Future } ;
87use std:: sync:: mpsc;
98
@@ -13,10 +12,7 @@ use r2d2_postgres::PostgresConnectionManager;
1312#[ test]
1413fn test_basic ( ) {
1514 let manager = PostgresConnectionManager :: new ( "postgres://postgres@localhost" , SslMode :: None ) ;
16- let config = r2d2:: Config {
17- pool_size : 2 ,
18- ..Default :: default ( )
19- } ;
15+ let config = r2d2:: Config :: builder ( ) . pool_size ( 2 ) . build ( ) ;
2016 let handler = Box :: new ( r2d2:: NoopErrorHandler ) ;
2117 let pool = Arc :: new ( r2d2:: Pool :: new ( config, manager, handler) . unwrap ( ) ) ;
2218
@@ -48,11 +44,7 @@ fn test_basic() {
4844#[ test]
4945fn test_is_valid ( ) {
5046 let manager = PostgresConnectionManager :: new ( "postgres://postgres@localhost" , SslMode :: None ) ;
51- let config = r2d2:: Config {
52- pool_size : 1 ,
53- test_on_check_out : true ,
54- ..Default :: default ( )
55- } ;
47+ let config = r2d2:: Config :: builder ( ) . pool_size ( 1 ) . test_on_check_out ( true ) . build ( ) ;
5648 let handler = Box :: new ( r2d2:: NoopErrorHandler ) ;
5749 let pool = r2d2:: Pool :: new ( config, manager, handler) . unwrap ( ) ;
5850
You can’t perform that action at this time.
0 commit comments