use let-else where the match only guarded an exit

This commit is contained in:
2026-09-21 01:18:07 +03:00
parent 72f24b7369
commit 7c577eafd7
3 changed files with 9 additions and 16 deletions
+2 -3
View File
@@ -75,9 +75,8 @@ fn find_fxc() -> Option<PathBuf> {
// Pick the highest-versioned SDK with an x64 fxc.exe.
let mut best: Option<(String, PathBuf)> = None;
for entry in entries.flatten() {
let name = match entry.file_name().into_string() {
Ok(s) => s,
Err(_) => continue,
let Ok(name) = entry.file_name().into_string() else {
continue;
};
// Skip non-version dirs (arm64, x64, x86 at the root level).
if !name.starts_with("10.") {