Some wiggling

This commit is contained in:
Gwilym Kuiper 2022-03-20 14:22:43 +00:00
parent 86635752af
commit 2706b2494d

View file

@ -163,7 +163,7 @@ pub struct VacantEntry<'a, K: 'a, V: 'a> {
} }
impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> { impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
pub fn insert(self, value: V) fn insert(self, value: V)
where where
K: Hash + Eq, K: Hash + Eq,
{ {
@ -195,7 +195,7 @@ where
Entry::Occupied(_) => {} Entry::Occupied(_) => {}
Entry::Vacant(e) => { Entry::Vacant(e) => {
let value = f(&e.key); let value = f(&e.key);
e.map.insert(e.key, value); e.insert(value);
} }
} }
} }