@@ -345,10 +345,7 @@ impl<'a> MakeBcbCounters<'a> {
345
345
sumup_counter_operand,
346
346
|| None ,
347
347
) ;
348
- debug ! (
349
- " [new intermediate expression: {}]" ,
350
- self . format_counter( & intermediate_expression)
351
- ) ;
348
+ debug ! ( " [new intermediate expression: {:?}]" , intermediate_expression) ;
352
349
let intermediate_expression_operand = intermediate_expression. as_operand ( ) ;
353
350
self . coverage_counters . intermediate_expressions . push ( intermediate_expression) ;
354
351
some_sumup_counter_operand. replace ( intermediate_expression_operand) ;
@@ -372,7 +369,7 @@ impl<'a> MakeBcbCounters<'a> {
372
369
sumup_counter_operand,
373
370
|| Some ( format ! ( "{expression_branch:?}" ) ) ,
374
371
) ;
375
- debug ! ( "{:?} gets an expression: {}" , expression_branch, self . format_counter ( & expression) ) ;
372
+ debug ! ( "{:?} gets an expression: {:? }" , expression_branch, expression) ;
376
373
let bcb = expression_branch. target_bcb ;
377
374
if expression_branch. is_only_path_to_target ( ) {
378
375
self . coverage_counters . set_bcb_counter ( bcb, expression) ?;
@@ -394,10 +391,10 @@ impl<'a> MakeBcbCounters<'a> {
394
391
// If the BCB already has a counter, return it.
395
392
if let Some ( counter_kind) = & self . coverage_counters . bcb_counters [ bcb] {
396
393
debug ! (
397
- "{}{:?} already has a counter: {}" ,
394
+ "{}{:?} already has a counter: {:? }" ,
398
395
NESTED_INDENT . repeat( debug_indent_level) ,
399
396
bcb,
400
- self . format_counter ( counter_kind) ,
397
+ counter_kind,
401
398
) ;
402
399
return Ok ( counter_kind. as_operand ( ) ) ;
403
400
}
@@ -410,19 +407,19 @@ impl<'a> MakeBcbCounters<'a> {
410
407
let counter_kind = self . coverage_counters . make_counter ( || Some ( format ! ( "{bcb:?}" ) ) ) ;
411
408
if one_path_to_target {
412
409
debug ! (
413
- "{}{:?} gets a new counter: {}" ,
410
+ "{}{:?} gets a new counter: {:? }" ,
414
411
NESTED_INDENT . repeat( debug_indent_level) ,
415
412
bcb,
416
- self . format_counter ( & counter_kind) ,
413
+ counter_kind,
417
414
) ;
418
415
} else {
419
416
debug ! (
420
417
"{}{:?} 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 \
422
419
code will generate an infinite loop.)",
423
420
NESTED_INDENT . repeat( debug_indent_level) ,
424
421
bcb,
425
- self . format_counter ( & counter_kind) ,
422
+ counter_kind,
426
423
) ;
427
424
}
428
425
return self . coverage_counters . set_bcb_counter ( bcb, counter_kind) ;
@@ -460,9 +457,9 @@ impl<'a> MakeBcbCounters<'a> {
460
457
|| None ,
461
458
) ;
462
459
debug ! (
463
- "{}new intermediate expression: {}" ,
460
+ "{}new intermediate expression: {:? }" ,
464
461
NESTED_INDENT . repeat( debug_indent_level) ,
465
- self . format_counter ( & intermediate_expression)
462
+ intermediate_expression
466
463
) ;
467
464
let intermediate_expression_operand = intermediate_expression. as_operand ( ) ;
468
465
self . coverage_counters . intermediate_expressions . push ( intermediate_expression) ;
@@ -476,10 +473,10 @@ impl<'a> MakeBcbCounters<'a> {
476
473
|| Some ( format ! ( "{bcb:?}" ) ) ,
477
474
) ;
478
475
debug ! (
479
- "{}{:?} gets a new counter (sum of predecessor counters): {}" ,
476
+ "{}{:?} gets a new counter (sum of predecessor counters): {:? }" ,
480
477
NESTED_INDENT . repeat( debug_indent_level) ,
481
478
bcb,
482
- self . format_counter ( & counter_kind)
479
+ counter_kind
483
480
) ;
484
481
self . coverage_counters . set_bcb_counter ( bcb, counter_kind)
485
482
}
@@ -510,11 +507,11 @@ impl<'a> MakeBcbCounters<'a> {
510
507
self . coverage_counters . bcb_edge_counters . get ( & ( from_bcb, to_bcb) )
511
508
{
512
509
debug ! (
513
- "{}Edge {:?}->{:?} already has a counter: {}" ,
510
+ "{}Edge {:?}->{:?} already has a counter: {:? }" ,
514
511
NESTED_INDENT . repeat( debug_indent_level) ,
515
512
from_bcb,
516
513
to_bcb,
517
- self . format_counter ( counter_kind)
514
+ counter_kind
518
515
) ;
519
516
return Ok ( counter_kind. as_operand ( ) ) ;
520
517
}
@@ -523,11 +520,11 @@ impl<'a> MakeBcbCounters<'a> {
523
520
let counter_kind =
524
521
self . coverage_counters . make_counter ( || Some ( format ! ( "{from_bcb:?}->{to_bcb:?}" ) ) ) ;
525
522
debug ! (
526
- "{}Edge {:?}->{:?} gets a new counter: {}" ,
523
+ "{}Edge {:?}->{:?} gets a new counter: {:? }" ,
527
524
NESTED_INDENT . repeat( debug_indent_level) ,
528
525
from_bcb,
529
526
to_bcb,
530
- self . format_counter ( & counter_kind)
527
+ counter_kind
531
528
) ;
532
529
self . coverage_counters . set_bcb_edge_counter ( from_bcb, to_bcb, counter_kind)
533
530
}
@@ -686,9 +683,4 @@ impl<'a> MakeBcbCounters<'a> {
686
683
fn bcb_dominates ( & self , dom : BasicCoverageBlock , node : BasicCoverageBlock ) -> bool {
687
684
self . basic_coverage_blocks . dominates ( dom, node)
688
685
}
689
-
690
- #[ inline]
691
- fn format_counter ( & self , counter_kind : & BcbCounter ) -> String {
692
- format ! ( "{counter_kind:?}" )
693
- }
694
686
}
0 commit comments