Skip to content

Commit a75287e

Browse files
committed
Fix for upstream changes
1 parent eb89d0f commit a75287e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use postgres::{IntoConnectParams, SslMode};
1717
use postgres::types::ToSql;
1818

1919
/// A unified enum of errors returned by postgres::Connection
20-
#[deriving(Clone)]
20+
#[derive(Clone)]
2121
pub 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)]
123123
pub struct Config {
124124
/// The number of `postgres::Statement`s that will be internally cached.
125125
///

tests/test.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ extern crate r2d2_postgres;
44

55
use std::default::Default;
66
use std::sync::{Arc, Future};
7-
use std::comm;
7+
use std::sync::mpsc;
88

99
use postgres::SslMode;
1010
use 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

0 commit comments

Comments
 (0)