Skip to content

Commit dbaa7e2

Browse files
committed
Increase count of all regions assigned to an expression
1 parent e877e36 commit dbaa7e2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/coverage/coverage_mapping.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ impl<'a> CoverageMapping<'a> {
200200
};
201201

202202
region_ids.insert(counter, count);
203-
if let Some(expr_region) = func.regions.iter().find(|x| {
203+
for expr_region in func.regions.iter().filter(|x| {
204204
x.count.is_expression() && x.count.id == expr_index as u64
205205
}) {
206206
let result = report
@@ -256,7 +256,7 @@ impl<'a> CoverageMapping<'a> {
256256
};
257257

258258
region_ids.insert(counter, count);
259-
if let Some(expr_region) = func.regions.iter().find(|x| {
259+
for expr_region in func.regions.iter().filter(|x| {
260260
x.count.is_expression() && x.count.id == *expr_index as u64
261261
}) {
262262
let result = report

0 commit comments

Comments
 (0)