Skip to content

Commit

Permalink
PR fix - unsound needless lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
Yosi-Hezi committed Aug 22, 2022
1 parent 749ded4 commit 4109ea3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ impl<K: Hash + Eq, V, S: BuildHasher> LruCache<K, V, S> {
/// assert_eq!(cache.get_or_insert_mut(3, ||"f"), &mut "f");
/// assert_eq!(cache.get_or_insert_mut(3, ||"e"), &mut "f");
/// ```
pub fn get_or_insert_mut<'a, F>(&mut self, k: K, f: F) -> &'a mut V
pub fn get_or_insert_mut<'a, F>(&'a mut self, k: K, f: F) -> &'a mut V
where
F: FnOnce() -> V,
{
Expand Down

0 comments on commit 4109ea3

Please sign in to comment.