From 24dd856cfd8dafa291cd2d1d1ad31ddc83ef1b4f Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 22 Sep 2017 11:01:34 -0400 Subject: [PATCH] Fixed docs for Timeout::new and new_at They no longer return futures, they return io::Result. --- src/reactor/timeout.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/reactor/timeout.rs b/src/reactor/timeout.rs index 65eb4841d..92bf0a2cc 100644 --- a/src/reactor/timeout.rs +++ b/src/reactor/timeout.rs @@ -27,8 +27,8 @@ pub struct Timeout { impl Timeout { /// Creates a new timeout which will fire at `dur` time into the future. /// - /// This function will return a future that will resolve to the actual - /// timeout object. The timeout object itself is then a future which will be + /// This function will return a Result with the actual timeout object or an + /// error. The timeout object itself is then a future which will be /// set to fire at the specified point in the future. pub fn new(dur: Duration, handle: &Handle) -> io::Result { Timeout::new_at(Instant::now() + dur, handle) @@ -36,8 +36,8 @@ impl Timeout { /// Creates a new timeout which will fire at the time specified by `at`. /// - /// This function will return a future that will resolve to the actual - /// timeout object. The timeout object itself is then a future which will be + /// This function will return a Result with the actual timeout object or an + /// error. The timeout object itself is then a future which will be /// set to fire at the specified point in the future. pub fn new_at(at: Instant, handle: &Handle) -> io::Result { Ok(Timeout {