mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-23 00:00:10 +02:00
docs: fix all rustdoc warnings (#1474)
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
//!
|
||||
//! [n]: fn.now.html
|
||||
//! [`Now`]: trait.Now.html
|
||||
//! [`Instant`]: https://doc.rust-lang.org/std/time/struct.Instant.html
|
||||
//! [`Instant::now`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.now
|
||||
//! [`Instant`]: std::time::Instant
|
||||
//! [`Instant::now`]: std::time::Instant::now
|
||||
//! [`with_default`]: fn.with_default.html
|
||||
|
||||
mod now;
|
||||
@@ -31,8 +31,8 @@ use std::time::Instant;
|
||||
/// `Clock` instances return [`Instant`] values corresponding to "now". The source
|
||||
/// of these values is configurable. The default source is [`Instant::now`].
|
||||
///
|
||||
/// [`Instant`]: https://doc.rust-lang.org/std/time/struct.Instant.html
|
||||
/// [`Instant::now`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.now
|
||||
/// [`Instant`]: std::time::Instant
|
||||
/// [`Instant::now`]: std::time::Instant::now
|
||||
#[derive(Default, Clone)]
|
||||
pub struct Clock {
|
||||
now: Option<Arc<dyn Now>>,
|
||||
@@ -87,7 +87,7 @@ impl Clock {
|
||||
/// Return a new `Clock` instance that uses [`Instant::now`] as the source
|
||||
/// of time.
|
||||
///
|
||||
/// [`Instant::now`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.now
|
||||
/// [`Instant::now`]: std::time::Instant::now
|
||||
pub fn system() -> Clock {
|
||||
Clock { now: None }
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ use std::time::Instant;
|
||||
/// Implementations must ensure that calls to `now` return monotonically
|
||||
/// increasing [`Instant`] values.
|
||||
///
|
||||
/// [`Instant`]: https://doc.rust-lang.org/std/time/struct.Instant.html
|
||||
/// [`Instant`]: std::time::Instant
|
||||
pub trait Now: Send + Sync + 'static {
|
||||
/// Returns an instant corresponding to "now".
|
||||
fn now(&self) -> Instant;
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
//!
|
||||
//! [`Delay`]: struct.Delay.html
|
||||
//! [`DelayQueue`]: struct.DelayQueue.html
|
||||
//! [`Throttle`]: throttle/struct.Throttle.html
|
||||
//! [`Throttle`]: throttle::Throttle
|
||||
//! [`Timeout`]: struct.Timeout.html
|
||||
//! [`Interval`]: struct.Interval.html
|
||||
//! [`Timer`]: timer/struct.Timer.html
|
||||
//! [`Timer`]: timer::Timer
|
||||
|
||||
pub mod clock;
|
||||
pub mod delay_queue;
|
||||
|
||||
@@ -108,7 +108,7 @@ impl Handle {
|
||||
///
|
||||
/// See [type] level documentation for more ways to obtain a `Handle` value.
|
||||
///
|
||||
/// [`with_default`]: ../fn.with_default.html
|
||||
/// [`with_default`]: fn.with_default
|
||||
/// [type]: #
|
||||
pub fn current() -> Handle {
|
||||
let private =
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
//!
|
||||
//! [`Timer`]: struct.Timer.html
|
||||
//! [`Handle`]: struct.Handle.html
|
||||
//! [`Delay`]: ../struct.Delay.html
|
||||
//! [`Now`]: ../clock/trait.Now.html
|
||||
//! [`Now::now`]: ../clock/trait.Now.html#method.now
|
||||
//! [`Delay`]: Delay
|
||||
//! [`Now`]: clock::Now
|
||||
//! [`Now::now`]: clock::Now::now
|
||||
//! [`SystemNow`]: struct.SystemNow.html
|
||||
//! [`Instant`]: https://doc.rust-lang.org/std/time/struct.Instant.html
|
||||
//! [`Instant::now`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.now
|
||||
//! [`Instant`]: std::time::Instant
|
||||
//! [`Instant::now`]: std::time::Instant::now
|
||||
|
||||
// This allows the usage of the old `Now` trait.
|
||||
#![allow(deprecated)]
|
||||
@@ -115,9 +115,9 @@ use tokio_executor::park::{Park, ParkThread, Unpark};
|
||||
/// either be canceled (dropped) or their associated entries will reach level
|
||||
/// zero and be notified.
|
||||
///
|
||||
/// [`Delay`]: ../struct.Delay.html
|
||||
/// [`Interval`]: ../struct.Interval.html
|
||||
/// [`Timeout`]: ../struct.Timeout.html
|
||||
/// [`Delay`]: struct.Delay.html
|
||||
/// [`Interval`]: struct.Interval.html
|
||||
/// [`Timeout`]: struct.Timeout.html
|
||||
/// [paper]: http://www.cs.columbia.edu/~nahum/w6998/papers/ton97-timing-wheels.pdf
|
||||
/// [`handle`]: #method.handle
|
||||
/// [`turn`]: #method.turn
|
||||
|
||||
Reference in New Issue
Block a user