@@ -345,10 +345,7 @@ impl<'a> MakeBcbCounters<'a> {
345345 sumup_counter_operand,
346346 || None ,
347347 ) ;
348- debug ! (
349- " [new intermediate expression: {}]" ,
350- self . format_counter( & intermediate_expression)
351- ) ;
348+ debug ! ( " [new intermediate expression: {:?}]" , intermediate_expression) ;
352349 let intermediate_expression_operand = intermediate_expression. as_operand ( ) ;
353350 self . coverage_counters . intermediate_expressions . push ( intermediate_expression) ;
354351 some_sumup_counter_operand. replace ( intermediate_expression_operand) ;
@@ -372,7 +369,7 @@ impl<'a> MakeBcbCounters<'a> {
372369 sumup_counter_operand,
373370 || Some ( format ! ( "{expression_branch:?}" ) ) ,
374371 ) ;
375- debug ! ( "{:?} gets an expression: {}" , expression_branch, self . format_counter ( & expression) ) ;
372+ debug ! ( "{:?} gets an expression: {:? }" , expression_branch, expression) ;
376373 let bcb = expression_branch. target_bcb ;
377374 if expression_branch. is_only_path_to_target ( ) {
378375 self . coverage_counters . set_bcb_counter ( bcb, expression) ?;
@@ -394,10 +391,10 @@ impl<'a> MakeBcbCounters<'a> {
394391 // If the BCB already has a counter, return it.
395392 if let Some ( counter_kind) = & self . coverage_counters . bcb_counters [ bcb] {
396393 debug ! (
397- "{}{:?} already has a counter: {}" ,
394+ "{}{:?} already has a counter: {:? }" ,
398395 NESTED_INDENT . repeat( debug_indent_level) ,
399396 bcb,
400- self . format_counter ( counter_kind) ,
397+ counter_kind,
401398 ) ;
402399 return Ok ( counter_kind. as_operand ( ) ) ;
403400 }
@@ -410,19 +407,19 @@ impl<'a> MakeBcbCounters<'a> {
410407 let counter_kind = self . coverage_counters . make_counter ( || Some ( format ! ( "{bcb:?}" ) ) ) ;
411408 if one_path_to_target {
412409 debug ! (
413- "{}{:?} gets a new counter: {}" ,
410+ "{}{:?} gets a new counter: {:? }" ,
414411 NESTED_INDENT . repeat( debug_indent_level) ,
415412 bcb,
416- self . format_counter ( & counter_kind) ,
413+ counter_kind,
417414 ) ;
418415 } else {
419416 debug ! (
420417 "{}{:?} has itself as its own predecessor. It can't be part of its own \
421- Expression sum, so it will get its own new counter: {}. (Note, the compiled \
418+ Expression sum, so it will get its own new counter: {:? }. (Note, the compiled \
422419 code will generate an infinite loop.)",
423420 NESTED_INDENT . repeat( debug_indent_level) ,
424421 bcb,
425- self . format_counter ( & counter_kind) ,
422+ counter_kind,
426423 ) ;
427424 }
428425 return self . coverage_counters . set_bcb_counter ( bcb, counter_kind) ;
@@ -460,9 +457,9 @@ impl<'a> MakeBcbCounters<'a> {
460457 || None ,
461458 ) ;
462459 debug ! (
463- "{}new intermediate expression: {}" ,
460+ "{}new intermediate expression: {:? }" ,
464461 NESTED_INDENT . repeat( debug_indent_level) ,
465- self . format_counter ( & intermediate_expression)
462+ intermediate_expression
466463 ) ;
467464 let intermediate_expression_operand = intermediate_expression. as_operand ( ) ;
468465 self . coverage_counters . intermediate_expressions . push ( intermediate_expression) ;
@@ -476,10 +473,10 @@ impl<'a> MakeBcbCounters<'a> {
476473 || Some ( format ! ( "{bcb:?}" ) ) ,
477474 ) ;
478475 debug ! (
479- "{}{:?} gets a new counter (sum of predecessor counters): {}" ,
476+ "{}{:?} gets a new counter (sum of predecessor counters): {:? }" ,
480477 NESTED_INDENT . repeat( debug_indent_level) ,
481478 bcb,
482- self . format_counter ( & counter_kind)
479+ counter_kind
483480 ) ;
484481 self . coverage_counters . set_bcb_counter ( bcb, counter_kind)
485482 }
@@ -510,11 +507,11 @@ impl<'a> MakeBcbCounters<'a> {
510507 self . coverage_counters . bcb_edge_counters . get ( & ( from_bcb, to_bcb) )
511508 {
512509 debug ! (
513- "{}Edge {:?}->{:?} already has a counter: {}" ,
510+ "{}Edge {:?}->{:?} already has a counter: {:? }" ,
514511 NESTED_INDENT . repeat( debug_indent_level) ,
515512 from_bcb,
516513 to_bcb,
517- self . format_counter ( counter_kind)
514+ counter_kind
518515 ) ;
519516 return Ok ( counter_kind. as_operand ( ) ) ;
520517 }
@@ -523,11 +520,11 @@ impl<'a> MakeBcbCounters<'a> {
523520 let counter_kind =
524521 self . coverage_counters . make_counter ( || Some ( format ! ( "{from_bcb:?}->{to_bcb:?}" ) ) ) ;
525522 debug ! (
526- "{}Edge {:?}->{:?} gets a new counter: {}" ,
523+ "{}Edge {:?}->{:?} gets a new counter: {:? }" ,
527524 NESTED_INDENT . repeat( debug_indent_level) ,
528525 from_bcb,
529526 to_bcb,
530- self . format_counter ( & counter_kind)
527+ counter_kind
531528 ) ;
532529 self . coverage_counters . set_bcb_edge_counter ( from_bcb, to_bcb, counter_kind)
533530 }
@@ -686,9 +683,4 @@ impl<'a> MakeBcbCounters<'a> {
686683 fn bcb_dominates ( & self , dom : BasicCoverageBlock , node : BasicCoverageBlock ) -> bool {
687684 self . basic_coverage_blocks . dominates ( dom, node)
688685 }
689-
690- #[ inline]
691- fn format_counter ( & self , counter_kind : & BcbCounter ) -> String {
692- format ! ( "{counter_kind:?}" )
693- }
694686}
0 commit comments