Reduce (unnecessary) rebuilds (#2232)

* Reduce (unnecessary) rebuilds

* Avoid redundant clone

* Prefer `.display()` over `.to_str().unwrap()`
This commit is contained in:
Björn Quentin 2024-09-26 10:15:41 +02:00 committed by GitHub
parent feaf66847c
commit 9321a34dbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -126,16 +126,20 @@ fn env_change_work_around() {
let dotcargo = out_dir.join(".cargo/");
if dotcargo.exists() {
if dotcargo.join("config.toml").exists() {
println!(
"cargo:rerun-if-changed={}",
dotcargo.clone().join("config.toml").to_str().unwrap()
dotcargo.join("config.toml").display()
);
}
if dotcargo.join("config").exists() {
println!(
"cargo:rerun-if-changed={}",
dotcargo.clone().join("config").to_str().unwrap()
dotcargo.join("config").display()
);
}
}
}
fn emit_configuration(
prefix: &str,