Skip to content

Commit 1efba5d

Browse files
committed
Bump r2d2 version
1 parent fccd711 commit 1efba5d

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ name = "test"
1818
path = "tests/test.rs"
1919

2020
[dependencies]
21-
r2d2 = "0.4"
21+
r2d2 = "0.5"
2222
postgres = "0.6"

tests/test.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ extern crate postgres;
33
extern crate r2d2;
44
extern crate r2d2_postgres;
55

6-
use std::default::Default;
76
use std::sync::{Arc, Future};
87
use std::sync::mpsc;
98

@@ -13,10 +12,7 @@ use r2d2_postgres::PostgresConnectionManager;
1312
#[test]
1413
fn 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]
4945
fn 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

0 commit comments

Comments
 (0)