File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/cargo/core/compiler/fingerprint Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -2389,7 +2389,7 @@ pub fn parse_rustc_dep_info(rustc_dep_info: &Path) -> CargoResult<RustcDepInfo>
2389
2389
internal ( "malformed dep-info format, trailing \\ " . to_string ( ) )
2390
2390
} ) ?) ;
2391
2391
}
2392
- ret. files . insert ( file. into ( ) , None ) ;
2392
+ ret. files . entry ( file. into ( ) ) . or_insert ( None ) ;
2393
2393
}
2394
2394
} else if let Some ( rest) = line. strip_prefix ( "# checksum:" ) {
2395
2395
let mut parts = rest. splitn ( 3 , ' ' ) ;
@@ -2406,9 +2406,7 @@ pub fn parse_rustc_dep_info(rustc_dep_info: &Path) -> CargoResult<RustcDepInfo>
2406
2406
continue ;
2407
2407
} ;
2408
2408
2409
- if let Some ( entry) = ret. files . get_mut ( & path) {
2410
- * entry = Some ( ( file_len, checksum) ) ;
2411
- }
2409
+ ret. files . insert ( path, Some ( ( file_len, checksum) ) ) ;
2412
2410
}
2413
2411
}
2414
2412
return Ok ( ret) ;
You can’t perform that action at this time.
0 commit comments