Skip to content

Commit 1e36d9b

Browse files
committed
refactor(fingerprint): Separate out Metadata field initialization
1 parent e9b4758 commit 1e36d9b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cargo/core/compiler/build_runner/compilation_files.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,7 @@ fn compute_metadata(
593593
.iter()
594594
.map(|dep| *metadata_of(&dep.unit, build_runner, metas))
595595
.collect::<Vec<_>>();
596+
let use_extra_filename = use_extra_filename(bcx, unit);
596597

597598
let mut hasher = StableHasher::new();
598599

@@ -685,9 +686,11 @@ fn compute_metadata(
685686
dep_hashes.sort();
686687
dep_hashes.hash(&mut hasher);
687688

689+
let meta_hash = UnitHash(hasher.finish());
690+
688691
Metadata {
689-
meta_hash: UnitHash(hasher.finish()),
690-
use_extra_filename: use_extra_filename(bcx, unit),
692+
meta_hash,
693+
use_extra_filename,
691694
}
692695
}
693696

0 commit comments

Comments
 (0)