From b90467361f8df44a81e01ce12d30dab76f04879b Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Sun, 21 Jan 2024 12:26:18 -0800 Subject: [PATCH] docs: fix docs lints (#468) --- cordyceps/src/list.rs | 9 +++------ maitake-sync/src/rwlock/owned.rs | 8 ++++---- trace/src/writer.rs | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/cordyceps/src/list.rs b/cordyceps/src/list.rs index aa8dc552..01603d29 100644 --- a/cordyceps/src/list.rs +++ b/cordyceps/src/list.rs @@ -901,12 +901,9 @@ impl> + ?Sized> List { /// If the closure returns `false`, the element will remain in the list and /// will not be yielded by the iterator. /// - /// Note that *unlike* the [`drain_filter` method][std-filter] on - /// [`std::collections::LinkedList`], the closure is *not* permitted to - /// mutate the elements of the list, as a mutable reference could be used to - /// improperly unlink list nodes. - /// - /// [std-filter]: std::collections::LinkedList::drain_filter + /// Note that the closure is *not* permitted to mutate the elements of the + /// list, as a mutable reference could be used to improperly unlink list + /// nodes. #[must_use] pub fn drain_filter(&mut self, pred: F) -> DrainFilter<'_, T, F> where diff --git a/maitake-sync/src/rwlock/owned.rs b/maitake-sync/src/rwlock/owned.rs index 7400cfb4..c30cac34 100644 --- a/maitake-sync/src/rwlock/owned.rs +++ b/maitake-sync/src/rwlock/owned.rs @@ -101,7 +101,7 @@ impl RwLock { /// /// This method is identical to [`RwLock::read`], execept that it requires /// the `RwLock` to be wrapped in an [`Arc`], and returns an - /// [`OwnedRwLockReadGuard`][guard] that clones the [`Arc`] rather than + /// [`OwnedRwLockReadGuard`] that clones the [`Arc`] rather than /// borrowing the lock. Therefore, the returned guard is valid for the /// `'static` lifetime. /// @@ -171,7 +171,7 @@ impl RwLock { /// /// This method is identical to [`RwLock::write`], execept that it requires /// the `RwLock` to be wrapped in an [`Arc`], and returns an - /// [`OwnedRwLockWriteGuard`][guard] that clones the [`Arc`] rather than + /// [`OwnedRwLockWriteGuard`] that clones the [`Arc`] rather than /// borrowing the lock. Therefore, the returned guard is valid for the /// `'static` lifetime. /// @@ -226,7 +226,7 @@ impl RwLock { /// /// This method is identical to [`RwLock::try_read`], execept that it requires /// the `RwLock` to be wrapped in an [`Arc`], and returns an - /// [`OwnedRwLockReadGuard`][guard] that clones the [`Arc`] rather than + /// [`OwnedRwLockReadGuard`] that clones the [`Arc`] rather than /// borrowing the lock. Therefore, the returned guard is valid for the /// `'static` lifetime. /// @@ -273,7 +273,7 @@ impl RwLock { /// /// This method is identical to [`RwLock::try_write`], execept that it requires /// the `RwLock` to be wrapped in an [`Arc`], and returns an - /// [`OwnedRwLockWriteGuard`][guard] that clones the [`Arc`] rather than + /// [`OwnedRwLockWriteGuard`] that clones the [`Arc`] rather than /// borrowing the lock. Therefore, the returned guard is valid for the /// `'static` lifetime. /// diff --git a/trace/src/writer.rs b/trace/src/writer.rs index ee20d0dd..cc5db35b 100644 --- a/trace/src/writer.rs +++ b/trace/src/writer.rs @@ -132,7 +132,7 @@ pub trait MakeWriterExt<'a>: MakeWriter<'a> { /// Wraps `self` with a predicate that takes a span or event's [`Metadata`] /// and returns a `bool`. The returned [`MakeWriter`]'s - /// [`MakeWriter::make_writer_for`][mwf] method will check the predicate to + /// [`MakeWriter::make_writer_for`] method will check the predicate to /// determine if a writer should be produced for a given span or event. /// /// If the predicate returns `false`, the wrapped [`MakeWriter`]'s @@ -242,7 +242,7 @@ pub struct BoxMakeWriter { } */ -/// A [writer] that is one of two types implementing [`fmt::Write`][writer]. +/// A [writer] that is one of two types implementing [`fmt::Write`]. /// /// This may be used by [`MakeWriter`] implementations that may conditionally /// return one of two writers.