diff --git a/src/lib.rs b/src/lib.rs index be91a84..b1099fc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -532,7 +532,7 @@ impl LruCache { /// 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, {