Skip to content

Commit 39f722d

Browse files
authored
Mark more Connection functions as deprecated. (#1468)
This is in preparation of actually deleting the type from the library.
1 parent cf76bcc commit 39f722d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

redis/src/aio/connection.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,13 @@ where
9595
}
9696

9797
/// Converts this [`Connection`] into [`PubSub`].
98+
#[deprecated(note = "aio::Connection is deprecated. Use [Client::get_async_pubsub] instead")]
9899
pub fn into_pubsub(self) -> PubSub<C> {
99100
PubSub::new(self)
100101
}
101102

102103
/// Converts this [`Connection`] into [`Monitor`]
104+
#[deprecated(note = "aio::Connection is deprecated. Use [Client::get_async_pubsub] instead")]
103105
pub fn into_monitor(self) -> Monitor<C> {
104106
Monitor::new(self)
105107
}

redis/tests/test_async.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,7 @@ mod basic_async {
12801280
let ctx = TestContext::new();
12811281
block_on_all(
12821282
async move {
1283+
#[allow(deprecated)]
12831284
let mut pubsub_conn = ctx.deprecated_async_connection().await?.into_pubsub();
12841285
pubsub_conn.subscribe("phonewave").await?;
12851286
pubsub_conn.psubscribe("*").await?;

0 commit comments

Comments
 (0)