We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 047bb88 commit b131bf9Copy full SHA for b131bf9
1 file changed
src/store/weight.rs
@@ -560,7 +560,10 @@ where
560
/// ```
561
pub fn remove(&mut self, key: &K) -> Option<Arc<V>> {
562
let entry = self.map.remove(key)?;
563
- debug_assert!(self.total_weight >= entry.weight, "total_weight underflow in remove");
+ debug_assert!(
564
+ self.total_weight >= entry.weight,
565
+ "total_weight underflow in remove"
566
+ );
567
self.total_weight = self.total_weight.saturating_sub(entry.weight);
568
self.metrics.inc_remove();
569
Some(entry.value)
0 commit comments