mirror of
https://github.com/vladtrc/iw4L
synced 2026-10-26 02:11:39 -04:00
Collapse the IWD fallback read condition
Address the only added clippy warning in fork Actions run 36914579707; preserve name matching before the read and fallback after its error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -456,10 +456,10 @@ pub fn read_iwd_named(games_root: &Path, want: &str) -> Option<Vec<u8>> {
|
||||
let Ok(mut entry) = archive.by_index(index) else {
|
||||
continue;
|
||||
};
|
||||
if entry.name().replace('\\', "/").eq_ignore_ascii_case(&want) {
|
||||
if let Ok(bytes) = read_entry_bytes(&mut entry, None) {
|
||||
return Some(bytes);
|
||||
}
|
||||
if entry.name().replace('\\', "/").eq_ignore_ascii_case(&want)
|
||||
&& let Ok(bytes) = read_entry_bytes(&mut entry, None)
|
||||
{
|
||||
return Some(bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user