Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/inner/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl<'a, K, V> Entry<'a, K, V> {
}
}

/// A view into an occupied entry in an [`RingMap`][crate::RingMap].
/// A view into an occupied entry in a [`RingMap`][crate::RingMap].
/// It is part of the [`Entry`] enum.
pub struct OccupiedEntry<'a, K, V> {
map: &'a mut Core<K, V>,
Expand Down Expand Up @@ -252,7 +252,7 @@ impl<'a, K, V> From<IndexedEntry<'a, K, V>> for OccupiedEntry<'a, K, V> {
}
}

/// A view into a vacant entry in an [`RingMap`][crate::RingMap].
/// A view into a vacant entry in a [`RingMap`][crate::RingMap].
/// It is part of the [`Entry`] enum.
pub struct VacantEntry<'a, K, V> {
map: &'a mut Core<K, V>,
Expand Down
8 changes: 4 additions & 4 deletions src/macros.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// Create an [`RingMap`][crate::RingMap] from a list of key-value pairs
/// Create a [`RingMap`][crate::RingMap] from a list of key-value pairs
/// and a [`BuildHasherDefault`][core::hash::BuildHasherDefault]-wrapped custom hasher.
///
/// ## Example
Expand Down Expand Up @@ -38,7 +38,7 @@ macro_rules! ringmap_with_default {
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
#[macro_export]
/// Create an [`RingMap`][crate::RingMap] from a list of key-value pairs
/// Create a [`RingMap`][crate::RingMap] from a list of key-value pairs
///
/// ## Example
///
Expand Down Expand Up @@ -72,7 +72,7 @@ macro_rules! ringmap {
};
}

/// Create an [`RingSet`][crate::RingSet] from a list of values
/// Create a [`RingSet`][crate::RingSet] from a list of values
/// and a [`BuildHasherDefault`][core::hash::BuildHasherDefault]-wrapped custom hasher.
///
/// ## Example
Expand Down Expand Up @@ -112,7 +112,7 @@ macro_rules! ringset_with_default {
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
#[macro_export]
/// Create an [`RingSet`][crate::RingSet] from a list of values
/// Create a [`RingSet`][crate::RingSet] from a list of values
///
/// ## Example
///
Expand Down
2 changes: 1 addition & 1 deletion src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1883,7 +1883,7 @@ where
K: Hash + Eq,
S: BuildHasher + Default,
{
/// Create an `RingMap` from the sequence of key-value pairs in the
/// Create a `RingMap` from the sequence of key-value pairs in the
/// iterable.
///
/// `from_iter` uses the same logic as `extend`. See
Expand Down
4 changes: 2 additions & 2 deletions src/map/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::{Bucket, Core};
use crate::inner::entry::{OccupiedEntry, VacantEntry};
use core::{fmt, mem};

/// Entry for an existing key-value pair in an [`RingMap`][crate::RingMap]
/// Entry for an existing key-value pair in a [`RingMap`][crate::RingMap]
/// or a vacant location to insert one.
pub enum Entry<'a, K, V> {
/// Existing slot with equivalent key.
Expand Down Expand Up @@ -237,7 +237,7 @@ impl<K: fmt::Debug, V> fmt::Debug for VacantEntry<'_, K, V> {
}
}

/// A view into an occupied entry in an [`RingMap`][crate::RingMap] obtained by index.
/// A view into an occupied entry in a [`RingMap`][crate::RingMap] obtained by index.
///
/// This `struct` is created from the [`get_index_entry`][crate::RingMap::get_index_entry] method.
pub struct IndexedEntry<'a, K, V> {
Expand Down
20 changes: 10 additions & 10 deletions src/map/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl<K, V> Default for BucketsMut<'_, K, V> {
}
}

/// An iterator over the entries of an [`RingMap`].
/// An iterator over the entries of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::iter`] method.
/// See its documentation for more.
Expand Down Expand Up @@ -357,7 +357,7 @@ impl<K, V> Default for Iter<'_, K, V> {
}
}

/// A mutable iterator over the entries of an [`RingMap`].
/// A mutable iterator over the entries of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::iter_mut`] method.
/// See its documentation for more.
Expand Down Expand Up @@ -412,7 +412,7 @@ impl<K, V> Default for IterMut<'_, K, V> {
}
}

/// A mutable iterator over the entries of an [`RingMap`].
/// A mutable iterator over the entries of a [`RingMap`].
///
/// This `struct` is created by the [`MutableKeys::iter_mut2`][super::MutableKeys::iter_mut2] method.
/// See its documentation for more.
Expand Down Expand Up @@ -461,7 +461,7 @@ impl<K, V> Default for IterMut2<'_, K, V> {
}
}

/// An owning iterator over the entries of an [`RingMap`].
/// An owning iterator over the entries of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::into_iter`] method
/// (provided by the [`IntoIterator`] trait). See its documentation for more.
Expand Down Expand Up @@ -513,7 +513,7 @@ impl<K, V> Default for IntoIter<K, V> {
}
}

/// A draining iterator over the entries of an [`RingMap`].
/// A draining iterator over the entries of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::drain`] method.
/// See its documentation for more.
Expand Down Expand Up @@ -554,7 +554,7 @@ impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for Drain<'_, K, V> {
}
}

/// An iterator over the keys of an [`RingMap`].
/// An iterator over the keys of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::keys`] method.
/// See its documentation for more.
Expand Down Expand Up @@ -691,7 +691,7 @@ impl<K, V> Index<usize> for Keys<'_, K, V> {
}
}

/// An owning iterator over the keys of an [`RingMap`].
/// An owning iterator over the keys of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::into_keys`] method.
/// See its documentation for more.
Expand Down Expand Up @@ -742,7 +742,7 @@ impl<K, V> Default for IntoKeys<K, V> {
}
}

/// An iterator over the values of an [`RingMap`].
/// An iterator over the values of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::values`] method.
/// See its documentation for more.
Expand Down Expand Up @@ -805,7 +805,7 @@ impl<K, V> Default for Values<'_, K, V> {
}
}

/// A mutable iterator over the values of an [`RingMap`].
/// A mutable iterator over the values of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::values_mut`] method.
/// See its documentation for more.
Expand Down Expand Up @@ -860,7 +860,7 @@ impl<K, V> Default for ValuesMut<'_, K, V> {
}
}

/// An owning iterator over the values of an [`RingMap`].
/// An owning iterator over the values of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::into_values`] method.
/// See its documentation for more.
Expand Down
8 changes: 4 additions & 4 deletions src/map/raw_entry_v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl<K, V, S> RawEntryApiV1<K, V, S> for RingMap<K, V, S> {
}
}

/// A builder for computing where in an [`RingMap`] a key-value pair would be stored.
/// A builder for computing where in a [`RingMap`] a key-value pair would be stored.
///
/// This `struct` is created by the [`RingMap::raw_entry_v1`] method, provided by the
/// [`RawEntryApiV1`] trait. See its documentation for more.
Expand Down Expand Up @@ -233,7 +233,7 @@ impl<'a, K, V, S> RawEntryBuilder<'a, K, V, S> {
}
}

/// A builder for computing where in an [`RingMap`] a key-value pair would be stored.
/// A builder for computing where in a [`RingMap`] a key-value pair would be stored.
///
/// This `struct` is created by the [`RingMap::raw_entry_mut_v1`] method, provided by the
/// [`RawEntryApiV1`] trait. See its documentation for more.
Expand Down Expand Up @@ -358,7 +358,7 @@ impl<'a, K, V, S> RawEntryMut<'a, K, V, S> {
}
}

/// A raw view into an occupied entry in an [`RingMap`].
/// A raw view into an occupied entry in a [`RingMap`].
/// It is part of the [`RawEntryMut`] enum.
pub struct RawOccupiedEntryMut<'a, K, V, S> {
inner: OccupiedEntry<'a, K, V>,
Expand Down Expand Up @@ -551,7 +551,7 @@ impl<'a, K, V, S> RawOccupiedEntryMut<'a, K, V, S> {
}
}

/// A view into a vacant raw entry in an [`RingMap`].
/// A view into a vacant raw entry in a [`RingMap`].
/// It is part of the [`RawEntryMut`] enum.
pub struct RawVacantEntryMut<'a, K, V, S> {
map: &'a mut Core<K, V>,
Expand Down
6 changes: 3 additions & 3 deletions src/map/serde_seq.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Functions to serialize and deserialize an [`RingMap`] as an ordered sequence.
//! Functions to serialize and deserialize a [`RingMap`] as an ordered sequence.
//!
//! The default `serde` implementation serializes `RingMap` as a normal map,
//! but there is no guarantee that serialization formats will preserve the order
Expand Down Expand Up @@ -60,7 +60,7 @@ where
}
}

/// Serializes an [`RingMap`] as an ordered sequence.
/// Serializes a [`RingMap`] as an ordered sequence.
///
/// This function may be used in a field attribute for deriving [`Serialize`]:
///
Expand Down Expand Up @@ -113,7 +113,7 @@ where
}
}

/// Deserializes an [`RingMap`] from an ordered sequence.
/// Deserializes a [`RingMap`] from an ordered sequence.
///
/// This function may be used in a field attribute for deriving [`Deserialize`]:
///
Expand Down
2 changes: 1 addition & 1 deletion src/map/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use core::fmt;
use core::hash::{Hash, Hasher};
use core::ops::{self, Bound, Index, IndexMut, RangeBounds};

/// A dynamically-sized slice of key-value pairs in an [`RingMap`][super::RingMap].
/// A dynamically-sized slice of key-value pairs in a [`RingMap`][super::RingMap].
///
/// This supports indexed operations much like a `[(K, V)]` slice,
/// but not any hashed operations on the map keys.
Expand Down
14 changes: 7 additions & 7 deletions src/rayon/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ where
}
}

/// A parallel owning iterator over the entries of an [`RingMap`].
/// A parallel owning iterator over the entries of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::into_par_iter`] method
/// (provided by rayon's [`IntoParallelIterator`] trait). See its documentation for more.
Expand Down Expand Up @@ -175,7 +175,7 @@ where
}
}

/// A parallel iterator over the entries of an [`RingMap`].
/// A parallel iterator over the entries of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::par_iter`] method
/// (provided by rayon's [`IntoParallelRefIterator`] trait). See its documentation for more.
Expand Down Expand Up @@ -305,7 +305,7 @@ where
}
}

/// A parallel mutable iterator over the entries of an [`RingMap`].
/// A parallel mutable iterator over the entries of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::par_iter_mut`] method
/// (provided by rayon's [`IntoParallelRefMutIterator`] trait). See its documentation for more.
Expand Down Expand Up @@ -347,7 +347,7 @@ where
}
}

/// A parallel draining iterator over the entries of an [`RingMap`].
/// A parallel draining iterator over the entries of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::par_drain`] method
/// (provided by rayon's [`ParallelDrainRange`] trait). See its documentation for more.
Expand Down Expand Up @@ -444,7 +444,7 @@ where
}
}

/// A parallel iterator over the keys of an [`RingMap`].
/// A parallel iterator over the keys of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::par_keys`] method.
/// See its documentation for more.
Expand Down Expand Up @@ -477,7 +477,7 @@ impl<K: Sync, V: Sync> IndexedParallelIterator for ParKeys<'_, K, V> {
indexed_parallel_iterator_methods!(Bucket::key_ref);
}

/// A parallel iterator over the values of an [`RingMap`].
/// A parallel iterator over the values of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::par_values`] method.
/// See its documentation for more.
Expand Down Expand Up @@ -658,7 +658,7 @@ where
}
}

/// A parallel mutable iterator over the values of an [`RingMap`].
/// A parallel mutable iterator over the values of a [`RingMap`].
///
/// This `struct` is created by the [`RingMap::par_values_mut`] method.
/// See its documentation for more.
Expand Down
6 changes: 3 additions & 3 deletions src/rayon/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ where
}
}

/// A parallel owning iterator over the items of an [`RingSet`].
/// A parallel owning iterator over the items of a [`RingSet`].
///
/// This `struct` is created by the [`RingSet::into_par_iter`] method
/// (provided by rayon's [`IntoParallelIterator`] trait). See its documentation for more.
Expand Down Expand Up @@ -102,7 +102,7 @@ where
}
}

/// A parallel iterator over the items of an [`RingSet`].
/// A parallel iterator over the items of a [`RingSet`].
///
/// This `struct` is created by the [`RingSet::par_iter`] method
/// (provided by rayon's [`IntoParallelRefIterator`] trait). See its documentation for more.
Expand Down Expand Up @@ -151,7 +151,7 @@ where
}
}

/// A parallel draining iterator over the items of an [`RingSet`].
/// A parallel draining iterator over the items of a [`RingSet`].
///
/// This `struct` is created by the [`RingSet::par_drain`] method
/// (provided by rayon's [`ParallelDrainRange`] trait). See its documentation for more.
Expand Down
6 changes: 3 additions & 3 deletions src/set/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl<T, S> IntoIterator for RingSet<T, S> {
}
}

/// An iterator over the items of an [`RingSet`].
/// An iterator over the items of a [`RingSet`].
///
/// This `struct` is created by the [`RingSet::iter`] method.
/// See its documentation for more.
Expand Down Expand Up @@ -90,7 +90,7 @@ impl<T> Default for Iter<'_, T> {
}
}

/// An owning iterator over the items of an [`RingSet`].
/// An owning iterator over the items of a [`RingSet`].
///
/// This `struct` is created by the [`RingSet::into_iter`] method
/// (provided by the [`IntoIterator`] trait). See its documentation for more.
Expand Down Expand Up @@ -142,7 +142,7 @@ impl<T> Default for IntoIter<T> {
}
}

/// A draining iterator over the items of an [`RingSet`].
/// A draining iterator over the items of a [`RingSet`].
///
/// This `struct` is created by the [`RingSet::drain`] method.
/// See its documentation for more.
Expand Down
2 changes: 1 addition & 1 deletion src/set/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use core::fmt;
use core::hash::{Hash, Hasher};
use core::ops::{self, Bound, Index, RangeBounds};

/// A dynamically-sized slice of values in an [`RingSet`][super::RingSet].
/// A dynamically-sized slice of values in a [`RingSet`][super::RingSet].
///
/// This supports indexed operations much like a `[T]` slice,
/// but not any hashed operations on the values.
Expand Down