@@ -84,7 +84,10 @@ impl FunctionCoverage {
84
84
rhs : ExpressionOperandId ,
85
85
region : Option < CodeRegion > ,
86
86
) {
87
- debug ! ( "add_counter_expression({:?}, lhs={:?}, op={:?}, rhs={:?} at {:?}" , expression_id, lhs, op, rhs, region) ;
87
+ debug ! (
88
+ "add_counter_expression({:?}, lhs={:?}, op={:?}, rhs={:?} at {:?}" ,
89
+ expression_id, lhs, op, rhs, region
90
+ ) ;
88
91
let expression_index = self . expression_index ( u32:: from ( expression_id) ) ;
89
92
self . expressions [ expression_index]
90
93
. replace ( Expression { lhs, op, rhs, region } )
@@ -134,8 +137,7 @@ impl FunctionCoverage {
134
137
) -> ( Vec < CounterExpression > , impl Iterator < Item = ( Counter , & ' a CodeRegion ) > ) {
135
138
let mut counter_expressions = Vec :: with_capacity ( self . expressions . len ( ) ) ;
136
139
let mut expression_regions = Vec :: with_capacity ( self . expressions . len ( ) ) ;
137
- let mut new_indexes =
138
- IndexVec :: from_elem_n ( None , self . expressions . len ( ) ) ;
140
+ let mut new_indexes = IndexVec :: from_elem_n ( None , self . expressions . len ( ) ) ;
139
141
// Note that an `Expression`s at any given index can include other expressions as
140
142
// operands, but expression operands can only come from the subset of expressions having
141
143
// `expression_index`s lower than the referencing `Expression`. Therefore, it is
@@ -175,8 +177,6 @@ impl FunctionCoverage {
175
177
entry. as_ref ( ) . map ( |expression| ( original_index, expression) )
176
178
} )
177
179
{
178
- // TODO(richkadel): remove this debug:
179
- debug ! ( "Attempting to add {:?} = {:?}" , original_index, expression) ;
180
180
let optional_region = & expression. region ;
181
181
let Expression { lhs, op, rhs, .. } = * expression;
182
182
@@ -185,8 +185,14 @@ impl FunctionCoverage {
185
185
id_to_counter ( & new_indexes, rhs) . map ( |rhs_counter| ( lhs_counter, rhs_counter) )
186
186
} )
187
187
{
188
- debug_assert ! ( ( lhs_counter. id as usize ) < usize :: max( self . counters. len( ) , self . expressions. len( ) ) ) ;
189
- debug_assert ! ( ( rhs_counter. id as usize ) < usize :: max( self . counters. len( ) , self . expressions. len( ) ) ) ;
188
+ debug_assert ! (
189
+ ( lhs_counter. id as usize )
190
+ < usize :: max( self . counters. len( ) , self . expressions. len( ) )
191
+ ) ;
192
+ debug_assert ! (
193
+ ( rhs_counter. id as usize )
194
+ < usize :: max( self . counters. len( ) , self . expressions. len( ) )
195
+ ) ;
190
196
// Both operands exist. `Expression` operands exist in `self.expressions` and have
191
197
// been assigned a `new_index`.
192
198
let mapped_expression_index =
0 commit comments