Skip to content

Commit

Permalink
👷 refactor(wii): Clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ProfElements committed Dec 23, 2023
1 parent 833d7cc commit 7e55289
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/wii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,16 @@ impl Wii {
"/title/00000001/00000002/data/state.dat",
FileAccessMode::Read,
) {
state.read(&mut state_buf);
flags = Some(StateFlags::try_from(&state_buf).unwrap());
}
if state.read(&mut state_buf).is_ok() {
flags = Some(StateFlags::try_from(&state_buf).unwrap());
};
};

if let Ok(mut nand_info) = Ios::open("/shared2/sys/NANDBOOTINFO", FileAccessMode::Read) {
nand_info.read(&mut nand_info_buf);
info = Some(NandBootInfo::try_from(&nand_info_buf).unwrap());
}
if nand_info.read(&mut nand_info_buf).is_ok() {
info = Some(NandBootInfo::try_from(&nand_info_buf).unwrap());
}
};

if flags.is_some() && info.is_some() {
while Self::valid_checksum(&state_buf) && Self::valid_checksum(&nand_info_buf) {}
Expand Down

0 comments on commit 7e55289

Please sign in to comment.