From 4ffa7b5de4b76dd5a157600626c6efe3f543955c Mon Sep 17 00:00:00 2001 From: marmeladema Date: Thu, 2 May 2024 23:18:33 +0200 Subject: [PATCH] Make `contains` take `&self` instead of `&mut self` --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ee0b818..ac47f47 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -407,8 +407,8 @@ impl> CLruCache(&mut self, key: &Q) -> bool + /// Like `peek`, `contains` does not update the LRU list so the key's position will be unchanged. + pub fn contains(&self, key: &Q) -> bool where K: Borrow, Q: Hash + Eq + ?Sized,