mirror of https://github.com/xacrimon/dashmap
Fix doc typos.
This commit is contained in:
parent
ae354e6f6b
commit
4cc7bed127
34
src/lib.rs
34
src/lib.rs
|
@ -307,7 +307,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Inserts a key and a value into the map.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding any sort of reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding any sort of reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -324,7 +324,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Removes an entry from the map, returning the key and value if they existed in the map.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding any sort of reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding any sort of reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -347,7 +347,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
/// Removes an entry from the map, returning the key and value
|
||||
/// if the entry existed and the provided conditional function returned true.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding any sort of reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding any sort of reference into the map.
|
||||
///
|
||||
/// ```
|
||||
/// use dashmap::DashMap;
|
||||
|
@ -376,7 +376,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Creates an iterator over a DashMap yielding immutable references.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding a mutable reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding a mutable reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -394,7 +394,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Iterator over a DashMap yielding mutable references.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding any sort of reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding any sort of reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -413,7 +413,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Get a immutable reference to an entry in the map
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding a mutable reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding a mutable reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -435,7 +435,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Get a mutable reference to an entry in the map
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding any sort of reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding any sort of reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -458,7 +458,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Remove excess capacity to reduce memory usage.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding any sort of reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding any sort of reference into the map.
|
||||
#[inline]
|
||||
pub fn shrink_to_fit(&self) {
|
||||
self._shrink_to_fit();
|
||||
|
@ -467,7 +467,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
/// Retain elements that whose predicates return true
|
||||
/// and discard elements whose predicates return false.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding any sort of reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding any sort of reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -488,7 +488,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Fetches the total number of key-value pairs stored in the map.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding a mutable reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding a mutable reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -508,7 +508,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Checks if the map is empty or not.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding a mutable reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding a mutable reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -525,7 +525,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Removes all key-value pairs in the map.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding any sort of reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding any sort of reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -545,7 +545,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Returns how many key-value pairs the map can store without reallocating.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding a mutable reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding a mutable reference into the map.
|
||||
#[inline]
|
||||
pub fn capacity(&self) -> usize {
|
||||
self._capacity()
|
||||
|
@ -553,7 +553,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Modify a specific value according to a function.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding any sort of reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding any sort of reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -580,7 +580,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Modify every value in the map according to a function.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding any sort of reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding any sort of reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -605,7 +605,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
|
||||
/// Checks if the map contains a specific key.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding a mutable reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding a mutable reference into the map.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -628,7 +628,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
|
|||
/// Advanced entry API that tries to mimic `std::collections::HashMap`.
|
||||
/// See the documentation on `dashmap::mapref::entry` for more details.
|
||||
///
|
||||
/// **Locking behaviour:** May deadlock if called when holding holding any sort of reference into the map.
|
||||
/// **Locking behaviour:** May deadlock if called when holding any sort of reference into the map.
|
||||
#[inline]
|
||||
pub fn entry(&'a self, key: K) -> Entry<'a, K, V, S> {
|
||||
self._entry(key)
|
||||
|
|
Loading…
Reference in New Issue