Skip to content

Commit

Permalink
refactor(common): Remove unused TokioTimeout (hyperium#3464)
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Pfennig <s.pfennig@reply.de>
  • Loading branch information
daxhuiberts authored and 0xE282B0 committed Jan 16, 2024
1 parent d7c1535 commit d9c1c6e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions benches/support/tokiort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,6 @@ impl Timer for TokioTimer {
}
}

struct TokioTimeout<T> {
inner: Pin<Box<tokio::time::Timeout<T>>>,
}

impl<T> Future for TokioTimeout<T>
where
T: Future,
{
type Output = Result<T::Output, tokio::time::error::Elapsed>;

fn poll(mut self: Pin<&mut Self>, context: &mut Context<'_>) -> Poll<Self::Output> {
self.inner.as_mut().poll(context)
}
}

// Use TokioSleep to get tokio::time::Sleep to implement Unpin.
// see https://docs.rs/tokio/latest/tokio/time/struct.Sleep.html
pin_project! {
Expand Down

0 comments on commit d9c1c6e

Please sign in to comment.