From 9bf35976b553b7369f4a4d100b1c2bee89fb970e Mon Sep 17 00:00:00 2001 From: Zach Boyce Date: Fri, 11 Apr 2025 14:56:00 -0700 Subject: [PATCH] Update doc comments for Entry and EntryRef or_insert method Comments for the or_insert method for Entry and EntryRef were missing a word. Aligning with the other or_* methods --- src/mapref/entry.rs | 2 +- src/mapref/entry_ref.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mapref/entry.rs b/src/mapref/entry.rs index 6edf5427..ef4167a0 100644 --- a/src/mapref/entry.rs +++ b/src/mapref/entry.rs @@ -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(), diff --git a/src/mapref/entry_ref.rs b/src/mapref/entry_ref.rs index da8e7c29..a5400403 100644 --- a/src/mapref/entry_ref.rs +++ b/src/mapref/entry_ref.rs @@ -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(),