format the rust sources and split the functions that pushed over the line

This commit is contained in:
2026-09-21 06:33:23 +03:00
parent 205f68222c
commit 4125d509cc
10 changed files with 611 additions and 326 deletions
+7 -4
View File
@@ -18,9 +18,8 @@ fn compile_shaders() {
clippy::expect_used,
reason = "a build script without OUT_DIR cannot produce a usable build"
)]
let out_dir = PathBuf::from(
std::env::var("OUT_DIR").expect("OUT_DIR is set by cargo for build scripts"),
);
let out_dir =
PathBuf::from(std::env::var("OUT_DIR").expect("OUT_DIR is set by cargo for build scripts"));
let shader_dir = PathBuf::from("shaders");
let fxc = find_fxc();
@@ -88,7 +87,11 @@ fn find_fxc() -> Option<PathBuf> {
continue;
}
let fxc = entry.path().join("x64").join("fxc.exe");
if fxc.is_file() && best.as_ref().is_none_or(|(b, _)| name.as_str() > b.as_str()) {
if fxc.is_file()
&& best
.as_ref()
.is_none_or(|(b, _)| name.as_str() > b.as_str())
{
best = Some((name, fxc));
}
}