From 8c5cde9bc378a66699b36d745d5b29d339748806 Mon Sep 17 00:00:00 2001 From: Matthew James Briggs Date: Tue, 9 Mar 2021 23:39:43 -0800 Subject: [PATCH] stream: documentation note for throttle Unpin (#3600) --- tokio-stream/src/stream_ext/throttle.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tokio-stream/src/stream_ext/throttle.rs b/tokio-stream/src/stream_ext/throttle.rs index 99f3e0e00..f36c66a5d 100644 --- a/tokio-stream/src/stream_ext/throttle.rs +++ b/tokio-stream/src/stream_ext/throttle.rs @@ -23,7 +23,8 @@ where } pin_project! { - /// Stream for the [`throttle`](throttle) function. + /// Stream for the [`throttle`](throttle) function. This object is `!Unpin`. If you need it to + /// implement `Unpin` you can pin your throttle like this: `Box::pin(your_throttle)`. #[derive(Debug)] #[must_use = "streams do nothing unless polled"] pub struct Throttle {