diff --git a/bolt-sidecar/src/common/score_cache.rs b/bolt-sidecar/src/common/score_cache.rs index 52667ab0..9027b894 100644 --- a/bolt-sidecar/src/common/score_cache.rs +++ b/bolt-sidecar/src/common/score_cache.rs @@ -148,6 +148,7 @@ where /// A wrapper over [std::collections::HashMap::get_mut] that bumps the score of the key. /// /// Requires mutable access to the cache to update the score. + #[inline] pub fn get(&mut self, k: &Q) -> Option<&V> where K: Borrow, @@ -162,6 +163,7 @@ where /// A wrapper over [std::collections::HashMap::get_mut] that bumps the score of the key. /// /// Requires mutable access to the cache to update the score. + #[inline] pub fn get_mut(&mut self, k: &Q) -> Option<&mut V> where K: Borrow, @@ -177,6 +179,7 @@ where /// /// Adds a new key-value pair to the cache with the provided `INSERT_SCORE`, by first trying to /// clear any stale element from the cache if necessary. + #[inline] pub fn insert(&mut self, k: K, v: V) -> Option { self.clear_stales(); self.map.insert(k, (v, INSERT_SCORE)).map(|(v, _)| v)