Skip to content

Commit a4459d8

Browse files
authored
Add panic documentation for new Clippy lint.
Per discussion in #235.
1 parent 83ac6fd commit a4459d8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/map.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2942,6 +2942,10 @@ impl<'a, K, V, S, A: Allocator + Clone> OccupiedEntry<'a, K, V, S, A> {
29422942
/// Replaces the entry, returning the old key and value. The new key in the hash map will be
29432943
/// the key used to create this entry.
29442944
///
2945+
/// # Panics
2946+
///
2947+
/// Will panic if this OccupiedEntry was created through [`Entry::insert`].
2948+
///
29452949
/// # Examples
29462950
///
29472951
/// ```
@@ -2971,6 +2975,10 @@ impl<'a, K, V, S, A: Allocator + Clone> OccupiedEntry<'a, K, V, S, A> {
29712975

29722976
/// Replaces the key in the hash map with the key used to create this entry.
29732977
///
2978+
/// # Panics
2979+
///
2980+
/// Will panic if this OccupiedEntry was created through [`Entry::insert`].
2981+
///
29742982
/// # Examples
29752983
///
29762984
/// ```

0 commit comments

Comments
 (0)