mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-12 00:00:12 +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.
|
||||
///
|
||||
/// 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
|
||||
/// [`Error`].
|
||||
///
|
||||
@@ -43,7 +43,7 @@ use std::time::{Instant, Duration};
|
||||
/// # tx.unbounded_send(()).unwrap();
|
||||
/// # drop(tx);
|
||||
/// let process = rx.for_each(|item| {
|
||||
/// // do something with `iteem`
|
||||
/// // do something with `item`
|
||||
/// # drop(item);
|
||||
/// # Ok(())
|
||||
/// });
|
||||
@@ -55,7 +55,7 @@ use std::time::{Instant, Duration};
|
||||
/// # Cancelation
|
||||
///
|
||||
/// 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
|
||||
/// consumes the `Timeout`.
|
||||
|
||||
@@ -75,7 +75,7 @@ where
|
||||
}
|
||||
|
||||
/// Return the number of milliseconds that have elapsed since the timing
|
||||
/// wheele's creation.
|
||||
/// wheel's creation.
|
||||
pub fn elapsed(&self) -> u64 {
|
||||
self.elapsed
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user