Reduce (unnecessary) rebuilds (#2232)
* Reduce (unnecessary) rebuilds * Avoid redundant clone * Prefer `.display()` over `.to_str().unwrap()`
This commit is contained in:
parent
feaf66847c
commit
9321a34dbe
@ -126,14 +126,18 @@ fn env_change_work_around() {
|
|||||||
|
|
||||||
let dotcargo = out_dir.join(".cargo/");
|
let dotcargo = out_dir.join(".cargo/");
|
||||||
if dotcargo.exists() {
|
if dotcargo.exists() {
|
||||||
println!(
|
if dotcargo.join("config.toml").exists() {
|
||||||
"cargo:rerun-if-changed={}",
|
println!(
|
||||||
dotcargo.clone().join("config.toml").to_str().unwrap()
|
"cargo:rerun-if-changed={}",
|
||||||
);
|
dotcargo.join("config.toml").display()
|
||||||
println!(
|
);
|
||||||
"cargo:rerun-if-changed={}",
|
}
|
||||||
dotcargo.clone().join("config").to_str().unwrap()
|
if dotcargo.join("config").exists() {
|
||||||
);
|
println!(
|
||||||
|
"cargo:rerun-if-changed={}",
|
||||||
|
dotcargo.join("config").display()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user