chore: fix cargo docs warnings (#1362)

This PR simply fixes some cargo docs warnings.
This commit is contained in:
Folyd 2021-04-21 06:26:25 +08:00 committed by Eliza Weisman
parent 5e435b1220
commit 396d9f42a5
2 changed files with 7 additions and 7 deletions

View File

@ -641,14 +641,14 @@ impl Dispatch {
/// `T`. /// `T`.
#[inline] #[inline]
pub fn is<T: Any>(&self) -> bool { pub fn is<T: Any>(&self) -> bool {
Subscriber::is::<T>(&*self.subscriber) <dyn Subscriber>::is::<T>(&*self.subscriber)
} }
/// Returns some reference to the `Subscriber` this `Dispatch` forwards to /// Returns some reference to the `Subscriber` this `Dispatch` forwards to
/// if it is of type `T`, or `None` if it isn't. /// if it is of type `T`, or `None` if it isn't.
#[inline] #[inline]
pub fn downcast_ref<T: Any>(&self) -> Option<&T> { pub fn downcast_ref<T: Any>(&self) -> Option<&T> {
Subscriber::downcast_ref(&*self.subscriber) <dyn Subscriber>::downcast_ref(&*self.subscriber)
} }
} }

View File

@ -361,15 +361,15 @@ impl<F, T> Format<F, T> {
/// Use the given [`timer`] for log message timestamps. /// Use the given [`timer`] for log message timestamps.
/// ///
/// See [`time`] for the provided timer implementations. /// See [`time` module] for the provided timer implementations.
/// ///
/// Note that using the `chrono` feature flag enables the /// Note that using the `chrono` feature flag enables the
/// additional time formatters [`ChronoUtc`] and [`ChronoLocal`]. /// additional time formatters [`ChronoUtc`] and [`ChronoLocal`].
/// ///
/// [`time`]: ./time/index.html /// [`timer`]: super::time::FormatTime
/// [`timer`]: ./time/trait.FormatTime.html /// [`time` module]: mod@super::time
/// [`ChronoUtc`]: ./time/struct.ChronoUtc.html /// [`ChronoUtc`]: super::time::ChronoUtc
/// [`ChronoLocal`]: ./time/struct.ChronoLocal.html /// [`ChronoLocal`]: super::time::ChronoLocal
pub fn with_timer<T2>(self, timer: T2) -> Format<F, T2> { pub fn with_timer<T2>(self, timer: T2) -> Format<F, T2> {
Format { Format {
format: self.format, format: self.format,