Skip to content

Commit

Permalink
docs: fix docs lints (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Jan 21, 2024
1 parent b8bd91a commit b904673
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
9 changes: 3 additions & 6 deletions cordyceps/src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -901,12 +901,9 @@ impl<T: Linked<Links<T>> + ?Sized> List<T> {
/// 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<F>(&mut self, pred: F) -> DrainFilter<'_, T, F>
where
Expand Down
8 changes: 4 additions & 4 deletions maitake-sync/src/rwlock/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<T: ?Sized> RwLock<T> {
///
/// 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.
///
Expand Down Expand Up @@ -171,7 +171,7 @@ impl<T: ?Sized> RwLock<T> {
///
/// 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.
///
Expand Down Expand Up @@ -226,7 +226,7 @@ impl<T: ?Sized> RwLock<T> {
///
/// 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.
///
Expand Down Expand Up @@ -273,7 +273,7 @@ impl<T: ?Sized> RwLock<T> {
///
/// 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.
///
Expand Down
4 changes: 2 additions & 2 deletions trace/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit b904673

Please sign in to comment.