Skip to content

Commit db95d91

Browse files
authored
Add doc aliases sleep and timeout to Timer (#242)
Two examples are shown in `Timer`'s docs: One example for basic _sleeping_ and one example for having a _timeout_ on a future. This adds corresponding doc aliases to `Timer`, so that this struct is easier to find with those use cases in mind.
1 parent 25e8610 commit db95d91

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ pub use reactor::{Readable, ReadableOwned, Writable, WritableOwned};
138138
/// .await?;
139139
/// # std::io::Result::Ok(()) });
140140
/// ```
141+
#[doc(alias = "sleep")]
142+
#[doc(alias = "timeout")]
141143
#[derive(Debug)]
142144
pub struct Timer {
143145
/// This timer's ID and last waker that polled it.

0 commit comments

Comments
 (0)