enforce stricter lints, drop discarded results properly

This commit is contained in:
2026-09-21 00:40:51 +03:00
parent 95d168d5d8
commit 1332600148
12 changed files with 204 additions and 171 deletions
+3 -3
View File
@@ -39,18 +39,18 @@ fn compile_shaders() {
"cargo:warning=fxc failed for {entry}: {}",
String::from_utf8_lossy(&o.stderr)
);
let _ = std::fs::write(&dst, []);
drop(std::fs::write(&dst, []));
}
Err(e) => {
println!("cargo:warning=could not run fxc for {entry}: {e}");
let _ = std::fs::write(&dst, []);
drop(std::fs::write(&dst, []));
}
}
}
None => {
// No SDK on the build machine - emit an empty .cso; capture.rs
// detects the zero size and compiles the HLSL at runtime.
let _ = std::fs::write(&dst, []);
drop(std::fs::write(&dst, []));
}
}
}