Remove deprecated wait_timeout()

This commit is contained in:
Todd Mortimer 2021-04-05 15:27:20 -04:00
parent 5e3f087007
commit bbff7d45b8

View file

@ -234,16 +234,6 @@ impl<'a, T: SetReadTimeout + Read + Write + 'a> Handle<'a, T> {
self.timed_wait(keepalive, true, callback).map(|_| ()) self.timed_wait(keepalive, true, callback).map(|_| ())
} }
/// Block until the given amount of time has elapsed, or the given callback
/// returns `Stop`, or until an unhandled response arrives on the IDLE channel.
#[deprecated(note = "use wait_with_timeout instead")]
pub fn wait_timeout<F>(self, timeout: Duration, callback: F) -> Result<()>
where
F: FnMut(UnsolicitedResponse) -> CallbackAction,
{
self.wait_with_timeout(timeout, callback).map(|_| ())
}
/// Block until the given amount of time has elapsed, or the given callback /// Block until the given amount of time has elapsed, or the given callback
/// returns `Stop`, or until an unhandled response arrives on the IDLE channel. /// returns `Stop`, or until an unhandled response arrives on the IDLE channel.
pub fn wait_with_timeout<F>(self, timeout: Duration, callback: F) -> Result<WaitOutcome> pub fn wait_with_timeout<F>(self, timeout: Duration, callback: F) -> Result<WaitOutcome>