1
1
//! 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 " ) ]
3
3
#![ warn( missing_docs) ]
4
4
extern crate r2d2;
5
5
extern crate postgres;
@@ -40,7 +40,7 @@ impl error::Error for Error {
40
40
}
41
41
}
42
42
43
- /// An `r2d2::ConnectionManager ` for `postgres::Connection`s.
43
+ /// An `r2d2::ManageConnection ` for `postgres::Connection`s.
44
44
///
45
45
/// ## Example
46
46
///
@@ -57,11 +57,10 @@ impl error::Error for Error {
57
57
/// use r2d2_postgres::PostgresConnectionManager;
58
58
///
59
59
/// fn main() {
60
- /// let config =Default ::default();
60
+ /// let config =r2d2::Config ::default();
61
61
/// let manager = PostgresConnectionManager::new("postgres://postgres@localhost",
62
62
/// 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());
65
64
///
66
65
/// for i in 0..10i32 {
67
66
/// let pool = pool.clone();
@@ -92,7 +91,7 @@ impl PostgresConnectionManager {
92
91
}
93
92
}
94
93
95
- impl r2d2:: ConnectionManager for PostgresConnectionManager {
94
+ impl r2d2:: ManageConnection for PostgresConnectionManager {
96
95
type Connection = postgres:: Connection ;
97
96
type Error =Error ;
98
97