mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-09 00:00:08 +02:00
Fix a few typos in timer docs. (#569)
This commit is contained in:
committed by
Carl Lerche
parent
d16032cf06
commit
69d90ac7ee
@@ -15,7 +15,7 @@ use std::time::{Instant, Duration};
|
|||||||
|
|
||||||
/// Allows a `Future` or `Stream` to execute for a limited amount of time.
|
/// Allows a `Future` or `Stream` to execute for a limited amount of time.
|
||||||
///
|
///
|
||||||
/// If thee future or stream completes before the timeout has expired, then
|
/// If the future or stream completes before the timeout has expired, then
|
||||||
/// `Timeout` returns the completed value. Otherwise, `Timeout` returns an
|
/// `Timeout` returns the completed value. Otherwise, `Timeout` returns an
|
||||||
/// [`Error`].
|
/// [`Error`].
|
||||||
///
|
///
|
||||||
@@ -43,7 +43,7 @@ use std::time::{Instant, Duration};
|
|||||||
/// # tx.unbounded_send(()).unwrap();
|
/// # tx.unbounded_send(()).unwrap();
|
||||||
/// # drop(tx);
|
/// # drop(tx);
|
||||||
/// let process = rx.for_each(|item| {
|
/// let process = rx.for_each(|item| {
|
||||||
/// // do something with `iteem`
|
/// // do something with `item`
|
||||||
/// # drop(item);
|
/// # drop(item);
|
||||||
/// # Ok(())
|
/// # Ok(())
|
||||||
/// });
|
/// });
|
||||||
@@ -55,7 +55,7 @@ use std::time::{Instant, Duration};
|
|||||||
/// # Cancelation
|
/// # Cancelation
|
||||||
///
|
///
|
||||||
/// Cancelling a `Timeout` is done by dropping the value. No additional cleanup
|
/// Cancelling a `Timeout` is done by dropping the value. No additional cleanup
|
||||||
/// or otheer work is required.
|
/// or other work is required.
|
||||||
///
|
///
|
||||||
/// The original future or stream may be obtained by calling [`into_inner`]. This
|
/// The original future or stream may be obtained by calling [`into_inner`]. This
|
||||||
/// consumes the `Timeout`.
|
/// consumes the `Timeout`.
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Return the number of milliseconds that have elapsed since the timing
|
/// Return the number of milliseconds that have elapsed since the timing
|
||||||
/// wheele's creation.
|
/// wheel's creation.
|
||||||
pub fn elapsed(&self) -> u64 {
|
pub fn elapsed(&self) -> u64 {
|
||||||
self.elapsed
|
self.elapsed
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user