@@ -415,8 +415,7 @@ pub fn prepare_target(cx: &mut Context<'_, '_>, unit: &Unit, force: bool) -> Car
415
415
// information about failed comparisons to aid in debugging.
416
416
let fingerprint = calculate ( cx, unit) ?;
417
417
let mtime_on_use = cx. bcx . config . cli_unstable ( ) . mtime_on_use ;
418
- let compare = compare_old_fingerprint ( & loc, & * fingerprint, mtime_on_use) ;
419
- log_compare ( unit, & compare) ;
418
+ let compare = compare_old_fingerprint ( unit, & loc, & * fingerprint, mtime_on_use) ;
420
419
421
420
// If our comparison failed or reported dirty (e.g., we're going to trigger
422
421
// a rebuild of this crate), then we also ensure the source of the crate
@@ -1752,6 +1751,17 @@ fn target_root(cx: &Context<'_, '_>) -> PathBuf {
1752
1751
/// If dirty, it then restores the detailed information
1753
1752
/// from the fingerprint JSON file, and provides an rich dirty reason.
1754
1753
fn compare_old_fingerprint (
1754
+ unit : & Unit ,
1755
+ old_hash_path : & Path ,
1756
+ new_fingerprint : & Fingerprint ,
1757
+ mtime_on_use : bool ,
1758
+ ) -> CargoResult < Option < DirtyReason > > {
1759
+ let compare = _compare_old_fingerprint ( old_hash_path, new_fingerprint, mtime_on_use) ;
1760
+ log_compare ( unit, & compare) ;
1761
+ compare
1762
+ }
1763
+
1764
+ fn _compare_old_fingerprint (
1755
1765
old_hash_path : & Path ,
1756
1766
new_fingerprint : & Fingerprint ,
1757
1767
mtime_on_use : bool ,
0 commit comments