Skip to content

Commit e7307b4

Browse files
committed
Fix wrong access to maps
Signed-off-by: Mario Mueller <[email protected]>
1 parent 2262f08 commit e7307b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/metric.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,10 @@ impl Metrics {
196196

197197
#[inline]
198198
fn metric(&self, bucket: &PartitionedCounterBucket, p: Partition) -> u64 {
199-
bucket[&p]
199+
match bucket.get(&p) {
200+
Some(v) => *v,
201+
None => 0
202+
}
200203
}
201204
}
202205

0 commit comments

Comments
 (0)