File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -369,7 +369,7 @@ fn sanitize_filename(name: &str) -> String {
369369 }
370370 } )
371371 . collect ( ) ;
372- let trimmed = s. trim_start_matches ( | c : char | c == '.' || c == '_' ) ;
372+ let trimmed = s. trim_start_matches ( [ '.' , '_' ] ) ;
373373 let truncated = & trimmed[ ..trimmed. len ( ) . min ( 200 ) ] ;
374374 if truncated. is_empty ( ) {
375375 "unknown" . to_string ( )
Original file line number Diff line number Diff line change @@ -79,8 +79,6 @@ pub fn build_cu_index_from_symtab(data: &[u8]) -> Result<MachoCuIndex> {
7979
8080 // Group into batches and build CUs.
8181 let mut units = Vec :: new ( ) ;
82- let mut cu_id = 0usize ;
83-
8482 for ( batch_idx, batch) in fns. chunks ( BATCH_SIZE ) . enumerate ( ) {
8583 let batch_start = batch_idx * BATCH_SIZE ;
8684 let functions: Vec < MachoFunction > = batch
@@ -104,15 +102,14 @@ pub fn build_cu_index_from_symtab(data: &[u8]) -> Result<MachoCuIndex> {
104102 let cu_name = functions[ 0 ] . name . clone ( ) ;
105103
106104 units. push ( MachoCompilationUnit {
107- id : cu_id ,
105+ id : batch_idx ,
108106 name : cu_name,
109107 comp_dir : None ,
110108 oso_path : None ,
111109 ranges,
112110 functions,
113111 variables : vec ! [ ] ,
114112 } ) ;
115- cu_id += 1 ;
116113 }
117114
118115 Ok ( MachoCuIndex { units } )
You can’t perform that action at this time.
0 commit comments