mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
time: remove Unpin bound on Throttle methods (#5105)
This commit is contained in:
@@ -4,7 +4,6 @@ use crate::Stream;
|
|||||||
use tokio::time::{Duration, Instant, Sleep};
|
use tokio::time::{Duration, Instant, Sleep};
|
||||||
|
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
use std::marker::Unpin;
|
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
use std::task::{self, Poll};
|
use std::task::{self, Poll};
|
||||||
|
|
||||||
@@ -41,8 +40,7 @@ pin_project! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX: are these safe if `T: !Unpin`?
|
impl<T> Throttle<T> {
|
||||||
impl<T: Unpin> Throttle<T> {
|
|
||||||
/// Acquires a reference to the underlying stream that this combinator is
|
/// Acquires a reference to the underlying stream that this combinator is
|
||||||
/// pulling from.
|
/// pulling from.
|
||||||
pub fn get_ref(&self) -> &T {
|
pub fn get_ref(&self) -> &T {
|
||||||
|
|||||||
Reference in New Issue
Block a user