File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
src/cargo/core/compiler/fingerprint Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 11use std:: path:: Path ;
2+ use std:: path:: PathBuf ;
23
34use anyhow:: Context as _;
45use cargo_util:: paths;
@@ -63,18 +64,23 @@ impl RustdocFingerprint {
6364 }
6465}
6566
67+ /// Returns the path to rustdoc fingerprint file for a given [`CompileKind`].
68+ fn fingerprint_path ( build_runner : & BuildRunner < ' _ , ' _ > , kind : CompileKind ) -> PathBuf {
69+ build_runner
70+ . files ( )
71+ . layout ( kind)
72+ . build_dir ( )
73+ . root ( )
74+ . join ( ".rustdoc_fingerprint.json" )
75+ }
76+
6677/// Checks rustdoc fingerprint file for a given [`CompileKind`].
6778fn check_fingerprint (
6879 build_runner : & BuildRunner < ' _ , ' _ > ,
6980 new_fingerprint : & RustdocFingerprint ,
7081 kind : CompileKind ,
7182) -> CargoResult < ( ) > {
72- let fingerprint_path = build_runner
73- . files ( )
74- . layout ( kind)
75- . build_dir ( )
76- . root ( )
77- . join ( ".rustdoc_fingerprint.json" ) ;
83+ let fingerprint_path = fingerprint_path ( build_runner, kind) ;
7884
7985 let write_fingerprint = || -> CargoResult < ( ) > {
8086 paths:: write ( & fingerprint_path, serde_json:: to_string ( new_fingerprint) ?)
You can’t perform that action at this time.
0 commit comments