Skip to content

Commit

Permalink
refactor(common): Remove unused TokioTimeout (#3464)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxhuiberts committed Dec 8, 2023
1 parent 6d26ee0 commit bb818cc
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 bb818cc

Please sign in to comment.