Skip to content

Commit 9e112e4

Browse files
authored
User redis 0.28 (#106)
1 parent 523cccf commit 9e112e4

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

mobc-redis/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ keywords = ["redis", "pool", "async", "await"]
1212

1313
[dependencies]
1414
mobc = { version = "0.8", path = ".." }
15-
redis = { version = "0.24.0" }
15+
redis = { version = "0.28" }
1616

1717
[features]
1818
default = ["mobc/tokio", "redis/tokio-comp"]

mobc-redis/src/lib.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
pub use redis;
21
pub use mobc;
2+
pub use redis;
33

44
use mobc::async_trait;
55
use mobc::Manager;
6-
use redis::aio::Connection;
6+
use redis::aio::MultiplexedConnection as Connection;
77
use redis::{Client, ErrorKind};
88

99
pub struct RedisConnectionManager {
@@ -22,7 +22,7 @@ impl Manager for RedisConnectionManager {
2222
type Error = redis::RedisError;
2323

2424
async fn connect(&self) -> Result<Self::Connection, Self::Error> {
25-
let c = self.client.get_async_connection().await?;
25+
let c = self.client.get_multiplexed_async_connection().await?;
2626
Ok(c)
2727
}
2828

@@ -34,5 +34,3 @@ impl Manager for RedisConnectionManager {
3434
Ok(conn)
3535
}
3636
}
37-
38-

0 commit comments

Comments
 (0)