diff options
Diffstat (limited to 'melib/src/collection.rs')
-rw-r--r-- | melib/src/collection.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/melib/src/collection.rs b/melib/src/collection.rs index ea910d13..f686dcec 100644 --- a/melib/src/collection.rs +++ b/melib/src/collection.rs @@ -475,7 +475,7 @@ impl<K: std::cmp::Eq + std::hash::Hash, V> Deref for RwRef<'_, K, V> { type Target = V; fn deref(&self) -> &V { - self.guard.get(&self.hash).unwrap() + self.guard.get(&self.hash).expect("Hash was not found") } } @@ -486,7 +486,7 @@ pub struct RwRefMut<'g, K: std::cmp::Eq + std::hash::Hash, V> { impl<K: std::cmp::Eq + std::hash::Hash, V> DerefMut for RwRefMut<'_, K, V> { fn deref_mut(&mut self) -> &mut V { - self.guard.get_mut(&self.hash).unwrap() + self.guard.get_mut(&self.hash).expect("Hash was not found") } } @@ -494,6 +494,6 @@ impl<K: std::cmp::Eq + std::hash::Hash, V> Deref for RwRefMut<'_, K, V> { type Target = V; fn deref(&self) -> &V { - self.guard.get(&self.hash).unwrap() + self.guard.get(&self.hash).expect("Hash was not found") } } |