Skip to content

Commit 1e21688

Browse files
authoredMar 5, 2025··
Merge pull request #333 from CobaltCause/doc-insert-behavior
document behavior of insert methods
2 parents 0c3a081 + 4646310 commit 1e21688

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
 

‎src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> DashMap<K, V, S> {
480480
}
481481

482482
/// Inserts a key and a value into the map. Returns the old value associated with the key if there was one.
483+
/// Does not update the key if it was already present.
483484
///
484485
/// **Locking behaviour:** May deadlock if called when holding any sort of reference into the map.
485486
///

‎src/set.rs

+1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ impl<'a, K: 'a + Eq + Hash, S: BuildHasher + Clone> DashSet<K, S> {
193193
}
194194

195195
/// Inserts a key into the set. Returns true if the key was not already in the set.
196+
/// Does not update the key if it was already present.
196197
///
197198
/// # Examples
198199
///

0 commit comments

Comments
 (0)
Please sign in to comment.