Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/mapref/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl<'a, K: Eq + Hash, V> Entry<'a, K, V> {
}

/// Return a mutable reference to the element if it exists,
/// otherwise a provided value and return a mutable reference to that.
/// otherwise insert a provided value and return a mutable reference to that.
pub fn or_insert(self, value: V) -> RefMut<'a, K, V> {
match self {
Entry::Occupied(entry) => entry.into_ref(),
Expand Down
2 changes: 1 addition & 1 deletion src/mapref/entry_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl<'a, 'q, K: Eq + Hash + From<&'q Q>, Q, V> EntryRef<'a, 'q, K, Q, V> {
}

/// Return a mutable reference to the element if it exists,
/// otherwise a provided value and return a mutable reference to that.
/// otherwise insert a provided value and return a mutable reference to that.
pub fn or_insert(self, value: V) -> RefMut<'a, K, V> {
match self {
EntryRef::Occupied(entry) => entry.into_ref(),
Expand Down