From c51439d886f8004661d0b971e3ecde9b3b52297d Mon Sep 17 00:00:00 2001 From: Negezor Date: Sun, 31 Mar 2024 18:41:13 +1100 Subject: [PATCH] refactor: replace deprecated get_async_connection with get_multiplexed_async_connection --- examples/derive_async.rs | 2 +- examples/derive_redisjson.rs | 2 +- examples/derive_yaml.rs | 2 +- examples/json_wrapper_basic.rs | 2 +- examples/json_wrapper_modify.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/derive_async.rs b/examples/derive_async.rs index c95b2f9..178f313 100644 --- a/examples/derive_async.rs +++ b/examples/derive_async.rs @@ -25,7 +25,7 @@ struct User { async fn main() -> RedisResult<()> { // Open new async connection to localhost let client = Client::open("redis://localhost:6379")?; - let mut con = client.get_async_connection().await.map_err(|_| { + let mut con = client.get_multiplexed_async_connection().await.map_err(|_| { RedisError::from(( ErrorKind::InvalidClientConfig, "Cannot connect to localhost:6379. Try starting a redis-server process or container.", diff --git a/examples/derive_redisjson.rs b/examples/derive_redisjson.rs index 340278c..52cca9c 100644 --- a/examples/derive_redisjson.rs +++ b/examples/derive_redisjson.rs @@ -24,7 +24,7 @@ struct User { async fn main() -> RedisResult<()> { // Open new connection to localhost let client = Client::open("redis://localhost:6379")?; - let mut con = client.get_async_connection().await.map_err(|_| { + let mut con = client.get_multiplexed_async_connection().await.map_err(|_| { RedisError::from(( ErrorKind::InvalidClientConfig, "Cannot connect to localhost:6379. Try starting a redis-server process or container.", diff --git a/examples/derive_yaml.rs b/examples/derive_yaml.rs index cb79d11..a44c61e 100644 --- a/examples/derive_yaml.rs +++ b/examples/derive_yaml.rs @@ -25,7 +25,7 @@ struct User { async fn main() -> RedisResult<()> { // Open new async connection to localhost let client = Client::open("redis://localhost:6379")?; - let mut con = client.get_async_connection().await.map_err(|_| { + let mut con = client.get_multiplexed_async_connection().await.map_err(|_| { RedisError::from(( ErrorKind::InvalidClientConfig, "Cannot connect to localhost:6379. Try starting a redis-server process or container.", diff --git a/examples/json_wrapper_basic.rs b/examples/json_wrapper_basic.rs index 7725d41..668d8d5 100644 --- a/examples/json_wrapper_basic.rs +++ b/examples/json_wrapper_basic.rs @@ -22,7 +22,7 @@ struct User { async fn main() -> RedisResult<()> { // Open new connection to localhost let client = Client::open("redis://localhost:6379")?; - let mut con = client.get_async_connection().await.map_err(|_| { + let mut con = client.get_multiplexed_async_connection().await.map_err(|_| { RedisError::from(( ErrorKind::InvalidClientConfig, "Cannot connect to localhost:6379. Try starting a redis-server process or container.", diff --git a/examples/json_wrapper_modify.rs b/examples/json_wrapper_modify.rs index 2f05424..86949ec 100644 --- a/examples/json_wrapper_modify.rs +++ b/examples/json_wrapper_modify.rs @@ -21,7 +21,7 @@ struct User { async fn main() -> RedisResult<()> { // Open new connection to localhost let client = Client::open("redis://localhost:6379")?; - let mut con = client.get_async_connection().await.map_err(|_| { + let mut con = client.get_multiplexed_async_connection().await.map_err(|_| { RedisError::from(( ErrorKind::InvalidClientConfig, "Cannot connect to localhost:6379. Try starting a redis-server process or container.",