diff --git a/Cargo.toml b/Cargo.toml index fa6948b..1a41ba1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ mysql_async = { version = ">=0.30.0,<0.33", optional = true} mysql_common = {version = ">=0.29.0,<0.31.0", optional = true} bb8 = {version = "0.8", optional = true} -deadpool = {version = "0.9", optional = true} +deadpool = {version = "0.10", optional = true} mobc = {version = ">=0.7,<0.9", optional = true} scoped-futures = {version = "0.1", features = ["std"]} @@ -58,4 +58,3 @@ members = [ "examples/postgres/pooled-with-rustls", "examples/postgres/run-pending-migrations-with-rustls", ] - diff --git a/src/pooled_connection/deadpool.rs b/src/pooled_connection/deadpool.rs index dd275e8..4c48efe 100644 --- a/src/pooled_connection/deadpool.rs +++ b/src/pooled_connection/deadpool.rs @@ -48,7 +48,7 @@ pub type Pool = deadpool::managed::Pool>; /// Type alias for using [`deadpool::managed::PoolBuilder`] with [`diesel-async`] pub type PoolBuilder = deadpool::managed::PoolBuilder>; /// Type alias for using [`deadpool::managed::BuildError`] with [`diesel-async`] -pub type BuildError = deadpool::managed::BuildError; +pub type BuildError = deadpool::managed::BuildError; /// Type alias for using [`deadpool::managed::PoolError`] with [`diesel-async`] pub type PoolError = deadpool::managed::PoolError; /// Type alias for using [`deadpool::managed::Object`] with [`diesel-async`] @@ -57,8 +57,6 @@ pub type Object = deadpool::managed::Object>; pub type Hook = deadpool::managed::Hook>; /// Type alias for using [`deadpool::managed::HookError`] with [`diesel-async`] pub type HookError = deadpool::managed::HookError; -/// Type alias for using [`deadpool::managed::HookErrorCause`] with [`diesel-async`] -pub type HookErrorCause = deadpool::managed::HookErrorCause; #[async_trait::async_trait] impl Manager for AsyncDieselConnectionManager @@ -78,7 +76,11 @@ where .map_err(super::PoolError::ConnectionError) } - async fn recycle(&self, obj: &mut Self::Type) -> deadpool::managed::RecycleResult { + async fn recycle( + &self, + obj: &mut Self::Type, + _: &deadpool::managed::Metrics, + ) -> deadpool::managed::RecycleResult { if std::thread::panicking() || obj.is_broken() { return Err(deadpool::managed::RecycleError::StaticMessage( "Broken connection",