From 7ee2b122ac19b7347e92118d5a658b9b3fc5d947 Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Wed, 27 Nov 2024 00:00:00 +0000 Subject: [PATCH] chore(body): mark `Body::channel()` as deprecated Signed-off-by: katelyn martin --- src/body/body.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/body/body.rs b/src/body/body.rs index 7df87404f6..c7f1aeedda 100644 --- a/src/body/body.rs +++ b/src/body/body.rs @@ -137,6 +137,13 @@ impl Body { /// /// Useful when wanting to stream chunks from another thread. #[inline] + #[cfg_attr( + feature = "deprecated", + deprecated( + note = "This function has been removed. Wrap `tokio::sync::mspc::Receiver` in a `StreamBody` instead." + ) + )] + #[cfg_attr(feature = "deprecated", allow(deprecated))] pub fn channel() -> (Sender, Body) { Self::new_channel(DecodedLength::CHUNKED, /*wanter =*/ false) }