From bf5eed8fa029826bebcfbe50b8fc7b6296ee5f54 Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Fri, 14 Oct 2022 10:44:30 +0200 Subject: [PATCH] time: remove `Unpin` bound on `Throttle` methods (#5105) --- tokio-stream/src/stream_ext/throttle.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tokio-stream/src/stream_ext/throttle.rs b/tokio-stream/src/stream_ext/throttle.rs index f36c66a5d39..50001392ee7 100644 --- a/tokio-stream/src/stream_ext/throttle.rs +++ b/tokio-stream/src/stream_ext/throttle.rs @@ -4,7 +4,6 @@ use crate::Stream; use tokio::time::{Duration, Instant, Sleep}; use std::future::Future; -use std::marker::Unpin; use std::pin::Pin; use std::task::{self, Poll}; @@ -41,8 +40,7 @@ pin_project! { } } -// XXX: are these safe if `T: !Unpin`? -impl Throttle { +impl Throttle { /// Acquires a reference to the underlying stream that this combinator is /// pulling from. pub fn get_ref(&self) -> &T {