File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -79,22 +79,22 @@ impl Default for Config {
7979 }
8080}
8181
82- pub struct StatementPoolingManager {
82+ pub struct StatementCachingManager {
8383 manager : PostgresPoolManager ,
8484 config : Config ,
8585}
8686
87- impl StatementPoolingManager {
88- pub fn new < T > ( params : T , ssl_mode : SslMode , config : Config ) -> StatementPoolingManager
87+ impl StatementCachingManager {
88+ pub fn new < T > ( params : T , ssl_mode : SslMode , config : Config ) -> StatementCachingManager
8989 where T : IntoConnectParams {
90- StatementPoolingManager {
90+ StatementCachingManager {
9191 manager : PostgresPoolManager :: new ( params, ssl_mode) ,
9292 config : config
9393 }
9494 }
9595}
9696
97- impl r2d2:: PoolManager < Connection , Error > for StatementPoolingManager {
97+ impl r2d2:: PoolManager < Connection , Error > for StatementCachingManager {
9898 fn connect ( & self ) -> Result < Connection , Error > {
9999 let cache = box RefCell :: new ( LruCache :: < String , PostgresStatement < ' static > > :: new (
100100 self . config . statement_pool_size ) ) ;
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ fn test_is_valid() {
6262#[ test]
6363fn test_statement_pool ( ) {
6464 let config = r2d2_postgres:: Config { statement_pool_size : 1 } ;
65- let manager = r2d2_postgres:: StatementPoolingManager :: new (
65+ let manager = r2d2_postgres:: StatementCachingManager :: new (
6666 "postgres://postgres@localhost" , NoSsl , config) ;
6767 let pool = r2d2:: Pool :: new ( Default :: default ( ) , manager, r2d2:: NoopErrorHandler ) . unwrap ( ) ;
6868
You can’t perform that action at this time.
0 commit comments