aboutsummaryrefslogtreecommitdiff
path: root/src/model/index_counter.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-08 18:57:18 +0100
committerAlex Auvolat <alex@adnab.me>2024-02-08 23:29:57 +0100
commitad5ce968d212d951f7459c36bcbdd78ce39be585 (patch)
tree5412048a6e27a1d3aa03d802d28801c4d8a46746 /src/model/index_counter.rs
parentc2e1e172d4e15cbeb7210b87cfdde027d6aee782 (diff)
downloadgarage-ad5ce968d212d951f7459c36bcbdd78ce39be585.tar.gz
garage-ad5ce968d212d951f7459c36bcbdd78ce39be585.zip
[dep-upgrade-202402] remove useless mut
Diffstat (limited to 'src/model/index_counter.rs')
-rw-r--r--src/model/index_counter.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/model/index_counter.rs b/src/model/index_counter.rs
index a46c165f..c0bf38d8 100644
--- a/src/model/index_counter.rs
+++ b/src/model/index_counter.rs
@@ -232,7 +232,7 @@ impl<T: CountedItem> IndexCounter<T> {
let now = now_msec();
for (s, inc) in counts.iter() {
- let mut ent = entry.values.entry(s.to_string()).or_insert((0, 0));
+ let ent = entry.values.entry(s.to_string()).or_insert((0, 0));
ent.0 = std::cmp::max(ent.0 + 1, now);
ent.1 += *inc;
}
@@ -348,7 +348,7 @@ impl<T: CountedItem> IndexCounter<T> {
},
};
for (s, v) in counts.iter() {
- let mut tv = local_counter.values.entry(s.to_string()).or_insert((0, 0));
+ let tv = local_counter.values.entry(s.to_string()).or_insert((0, 0));
tv.0 = std::cmp::max(tv.0 + 1, now);
tv.1 += v;
}