File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ use postgres::{IntoConnectParams, SslMode};
1717use postgres:: types:: ToSql ;
1818
1919/// A unified enum of errors returned by postgres::Connection
20- #[ deriving ( Clone ) ]
20+ #[ derive ( Clone ) ]
2121pub enum Error {
2222 /// A postgres::ConnectError
2323 Connect ( postgres:: ConnectError ) ,
@@ -119,7 +119,7 @@ impl r2d2::PoolManager<postgres::Connection, Error> for PostgresPoolManager {
119119}
120120
121121/// Configuration options for the `CachingStatementManager`.
122- #[ deriving ( Copy , Clone ) ]
122+ #[ derive ( Copy , Clone ) ]
123123pub struct Config {
124124 /// The number of `postgres::Statement`s that will be internally cached.
125125 ///
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ extern crate r2d2_postgres;
44
55use std:: default:: Default ;
66use std:: sync:: { Arc , Future } ;
7- use std:: comm ;
7+ use std:: sync :: mpsc ;
88
99use postgres:: SslMode ;
1010use r2d2_postgres:: PostgresPoolManager ;
@@ -20,22 +20,22 @@ fn test_basic() {
2020 let handler = r2d2:: NoopErrorHandler ;
2121 let pool = Arc :: new ( r2d2:: Pool :: new ( config, manager, handler) . unwrap ( ) ) ;
2222
23- let ( s1, r1) = comm :: channel ( ) ;
24- let ( s2, r2) = comm :: channel ( ) ;
23+ let ( s1, r1) = mpsc :: channel ( ) ;
24+ let ( s2, r2) = mpsc :: channel ( ) ;
2525
2626 let pool1 = pool. clone ( ) ;
2727 let mut fut1 = Future :: spawn ( move || {
2828 let conn = pool1. get ( ) . unwrap ( ) ;
29- s1. send ( ( ) ) ;
30- r2. recv ( ) ;
29+ s1. send ( ( ) ) . unwrap ( ) ;
30+ r2. recv ( ) . unwrap ( ) ;
3131 drop ( conn) ;
3232 } ) ;
3333
3434 let pool2 = pool. clone ( ) ;
3535 let mut fut2 = Future :: spawn ( move || {
3636 let conn = pool2. get ( ) . unwrap ( ) ;
37- s2. send ( ( ) ) ;
38- r1. recv ( ) ;
37+ s2. send ( ( ) ) . unwrap ( ) ;
38+ r1. recv ( ) . unwrap ( ) ;
3939 drop ( conn) ;
4040 } ) ;
4141
You can’t perform that action at this time.
0 commit comments