diff --git a/mobc-redis/Cargo.toml b/mobc-redis/Cargo.toml index 07d05a1..6313a72 100644 --- a/mobc-redis/Cargo.toml +++ b/mobc-redis/Cargo.toml @@ -12,7 +12,7 @@ keywords = ["redis", "pool", "async", "await"] [dependencies] mobc = { version = "0.8", path = ".." } -redis = { version = "0.24.0" } +redis = { version = "0.28" } [features] default = ["mobc/tokio", "redis/tokio-comp"] diff --git a/mobc-redis/src/lib.rs b/mobc-redis/src/lib.rs index 332ca0a..17cf65c 100644 --- a/mobc-redis/src/lib.rs +++ b/mobc-redis/src/lib.rs @@ -1,9 +1,9 @@ -pub use redis; pub use mobc; +pub use redis; use mobc::async_trait; use mobc::Manager; -use redis::aio::Connection; +use redis::aio::MultiplexedConnection as Connection; use redis::{Client, ErrorKind}; pub struct RedisConnectionManager { @@ -22,7 +22,7 @@ impl Manager for RedisConnectionManager { type Error = redis::RedisError; async fn connect(&self) -> Result { - let c = self.client.get_async_connection().await?; + let c = self.client.get_multiplexed_async_connection().await?; Ok(c) } @@ -34,5 +34,3 @@ impl Manager for RedisConnectionManager { Ok(conn) } } - -