@@ -44,24 +44,22 @@ pub struct CrateStats {
44
44
impl CrateStats {
45
45
pub fn metadata_csv_header ( ) -> & ' static str {
46
46
"\
47
- num_effects, \
48
- total, loc_lb, loc_ub, \
49
- macros, loc_lb, loc_ub, \
50
- conditional_code, loc_lb, loc_ub, \
51
- skipped_calls, loc_lb, loc_ub, \
52
- skipped_fn_ptrs, loc_lb, loc_ub, \
53
- skipped_other, loc_lb, loc_ub, \
54
- unsafe_trait, loc_lb, loc_ub, \
55
- unsafe_impl, loc_lb, loc_ub, \
56
- pub_fns, pub_fns_with_effects, pub_total_effects, \
57
- audited_fns, audited_loc\
47
+ effects, \
48
+ macros, macro LoC, \
49
+ conditional blocks, conditional LoC, \
50
+ skipped calls, skipped call LoC, \
51
+ skipped fn pointers, skipped pointers LoC, \
52
+ skipped other, skipped other LoC, \
53
+ unsafe traits, unsafe trait LoC, \
54
+ unsafe impls, unsafe impl LoC, \
55
+ public fns, public fns with effects, public total effects, \
56
+ audited fns, audited LoC, total LoC\
58
57
"
59
58
}
60
59
pub fn metadata_csv ( & self ) -> String {
61
60
format ! (
62
61
"{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}" ,
63
62
self . effects. len( ) ,
64
- self . total_loc. as_csv( ) ,
65
63
self . skipped_macros. as_csv( ) ,
66
64
self . skipped_conditional_code. as_csv( ) ,
67
65
self . skipped_fn_calls. as_csv( ) ,
@@ -74,6 +72,7 @@ impl CrateStats {
74
72
self . pub_total_effects,
75
73
self . audited_fns,
76
74
self . audited_loc,
75
+ self . total_loc. get_loc( ) ,
77
76
)
78
77
}
79
78
}
@@ -143,7 +142,7 @@ fn get_auditing_metrics(audit: &AuditFile, results: &ScanResults) -> (usize, usi
143
142
144
143
for f in & total_fns {
145
144
if let Some ( tracker) = results. fn_loc_tracker . get ( f) {
146
- total_loc += tracker. get_loc_lb ( ) ;
145
+ total_loc += tracker. get_loc ( ) ;
147
146
} else {
148
147
// This case happens in the case of abstract trait method nodes
149
148
debug ! ( "no tracker found for a method -- possibly an abstract trait method" ) ;
0 commit comments