File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 1- #![ feature( std_misc) ]
21extern crate postgres;
32extern crate r2d2;
43extern crate r2d2_postgres;
54
65use std:: sync:: Arc ;
76use std:: sync:: mpsc;
8- use std:: thread:: Thread ;
7+ use std:: thread;
98
109use postgres:: SslMode ;
1110use r2d2_postgres:: PostgresConnectionManager ;
@@ -21,23 +20,23 @@ fn test_basic() {
2120 let ( s2, r2) = mpsc:: channel ( ) ;
2221
2322 let pool1 = pool. clone ( ) ;
24- let t1 = Thread :: scoped ( move || {
23+ let t1 = thread :: scoped ( move || {
2524 let conn = pool1. get ( ) . unwrap ( ) ;
2625 s1. send ( ( ) ) . unwrap ( ) ;
2726 r2. recv ( ) . unwrap ( ) ;
2827 drop ( conn) ;
2928 } ) ;
3029
3130 let pool2 = pool. clone ( ) ;
32- let t2 = Thread :: scoped ( move || {
31+ let t2 = thread :: scoped ( move || {
3332 let conn = pool2. get ( ) . unwrap ( ) ;
3433 s2. send ( ( ) ) . unwrap ( ) ;
3534 r1. recv ( ) . unwrap ( ) ;
3635 drop ( conn) ;
3736 } ) ;
3837
39- t1. join ( ) . ok ( ) . unwrap ( ) ;
40- t2. join ( ) . ok ( ) . unwrap ( ) ;
38+ t1. join ( ) ;
39+ t2. join ( ) ;
4140
4241 pool. get ( ) . unwrap ( ) ;
4342}
You can’t perform that action at this time.
0 commit comments