Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9838f14

Browse files
committed
Merge branch 'release-v0.9.2' into release
2 parents2e2d6c5 +ff28ff2 commit9838f14

File tree

4 files changed

+14
-18
lines changed

4 files changed

+14
-18
lines changed

‎Cargo.toml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name ="r2d2_postgres"
3-
version ="0.9.1"
3+
version ="0.9.2"
44
authors = ["Steven Fackler <sfackler@gmail.com>"]
55
license ="MIT"
66
description ="Postgres support for the r2d2 connection pool"
77
repository ="https://github.com/sfackler/r2d2-postgres"
8-
documentation ="https://sfackler.github.io/r2d2-postgres/doc/v0.9.1/r2d2_postgres"
8+
documentation ="https://sfackler.github.io/r2d2-postgres/doc/v0.9.2/r2d2_postgres"
99
keywords = ["postgres","sql","pool","database"]
1010

1111
[lib]
@@ -18,5 +18,5 @@ name = "test"
1818
path ="tests/test.rs"
1919

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

‎README.md‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
r2d2-postgres
22
=============
33

4-
[![Build Status](https://travis-ci.org/sfackler/r2d2-postgres.svg?branch=v0.6.0)](https://travis-ci.org/sfackler/r2d2-postgres)
4+
[![Build Status](https://travis-ci.org/sfackler/r2d2-postgres.svg?branch=master)](https://travis-ci.org/sfackler/r2d2-postgres)
55

66
[rust-postgres](https://github.com/sfackler/rust-postgres) support library for the[r2d2](https://github.com/sfackler/r2d2) connection pool.
77

8-
Documentation is available athttps://sfackler.github.io/r2d2-postgres/doc/v0.9.1/r2d2_postgres
8+
Documentation is available athttps://sfackler.github.io/r2d2-postgres/doc/v0.9.2/r2d2_postgres
99

1010
#Example
1111

@@ -21,11 +21,10 @@ use postgres::SslMode;
2121
user2d2_postgres::PostgresConnectionManager;
2222

2323
fnmain() {
24-
letconfig=Default::default();
24+
letconfig=r2d2::Config::default();
2525
letmanager=PostgresConnectionManager::new("postgres://postgres@localhost",
2626
SslMode::None).unwrap();
27-
leterror_handler=Box::new(r2d2::LoggingErrorHandler);
28-
letpool=Arc::new(r2d2::Pool::new(config,manager,error_handler).unwrap());
27+
letpool=Arc::new(r2d2::Pool::new(config,manager).unwrap());
2928

3029
foriin0..10i32 {
3130
letpool=pool.clone();

‎src/lib.rs‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Postgres support for the `r2d2` connection pool.
2-
#![doc(html_root_url="https://sfackler.github.io/r2d2-postgres/doc/v0.9.1")]
2+
#![doc(html_root_url="https://sfackler.github.io/r2d2-postgres/doc/v0.9.2")]
33
#![warn(missing_docs)]
44
externcrate r2d2;
55
externcrate postgres;
@@ -40,7 +40,7 @@ impl error::Error for Error {
4040
}
4141
}
4242

43-
/// An `r2d2::ConnectionManager` for `postgres::Connection`s.
43+
/// An `r2d2::ManageConnection` for `postgres::Connection`s.
4444
///
4545
/// ## Example
4646
///
@@ -57,11 +57,10 @@ impl error::Error for Error {
5757
/// use r2d2_postgres::PostgresConnectionManager;
5858
///
5959
/// fn main() {
60-
/// let config =Default::default();
60+
/// let config =r2d2::Config::default();
6161
/// let manager = PostgresConnectionManager::new("postgres://postgres@localhost",
6262
/// SslMode::None).unwrap();
63-
/// let error_handler = Box::new(r2d2::LoggingErrorHandler);
64-
/// let pool = Arc::new(r2d2::Pool::new(config, manager, error_handler).unwrap());
63+
/// let pool = Arc::new(r2d2::Pool::new(config, manager).unwrap());
6564
///
6665
/// for i in 0..10i32 {
6766
/// let pool = pool.clone();
@@ -92,7 +91,7 @@ impl PostgresConnectionManager {
9291
}
9392
}
9493

95-
impl r2d2::ConnectionManagerforPostgresConnectionManager{
94+
impl r2d2::ManageConnectionforPostgresConnectionManager{
9695
typeConnection = postgres::Connection;
9796
typeError =Error;
9897

‎tests/test.rs‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ use r2d2_postgres::PostgresConnectionManager;
1313
fntest_basic(){
1414
let manager =PostgresConnectionManager::new("postgres://postgres@localhost",SslMode::None).unwrap();
1515
let config = r2d2::Config::builder().pool_size(2).build();
16-
let handler =Box::new(r2d2::NoopErrorHandler);
17-
let pool =Arc::new(r2d2::Pool::new(config, manager, handler).unwrap());
16+
let pool =Arc::new(r2d2::Pool::new(config, manager).unwrap());
1817

1918
let(s1, r1) = mpsc::channel();
2019
let(s2, r2) = mpsc::channel();
@@ -45,8 +44,7 @@ fn test_basic() {
4544
fntest_is_valid(){
4645
let manager =PostgresConnectionManager::new("postgres://postgres@localhost",SslMode::None).unwrap();
4746
let config = r2d2::Config::builder().pool_size(1).test_on_check_out(true).build();
48-
let handler =Box::new(r2d2::NoopErrorHandler);
49-
let pool = r2d2::Pool::new(config, manager, handler).unwrap();
47+
let pool = r2d2::Pool::new(config, manager).unwrap();
5048

5149
pool.get().unwrap();
5250
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp