Skip to content

Commit

Permalink
refactor: replace deprecated get_async_connection with get_multiplexe…
Browse files Browse the repository at this point in the history
…d_async_connection
  • Loading branch information
negezor committed Mar 31, 2024
1 parent 018cec9 commit c51439d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/derive_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion examples/derive_redisjson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion examples/derive_yaml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion examples/json_wrapper_basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion examples/json_wrapper_modify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down

0 comments on commit c51439d

Please sign in to comment.