aboutsummaryrefslogtreecommitdiff
path: root/lib/header/src
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-04-24 15:04:10 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2026-04-24 15:04:10 +0200
commit11790d769b9dc651f3218bdfe40da59c7c9d400e (patch)
treef9d5182d17fac871a9f7efa92c94053e49e48e87 /lib/header/src
parentd95c68d8913d3ac434d86a681d215bd0da230b44 (diff)
downloadtools.nes-11790d769b9dc651f3218bdfe40da59c7c9d400e.tar.gz
tools.nes-11790d769b9dc651f3218bdfe40da59c7c9d400e.zip
Update the code style to the latest stable Rust
This mostly involves applying the collapsible_match rule[1] where appropiate, and using sort_by_key() as pointed out by the latest stable version of clippy. [1] https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_match Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'lib/header/src')
-rw-r--r--lib/header/src/lib.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/header/src/lib.rs b/lib/header/src/lib.rs
index 7a858ea..bd1edaa 100644
--- a/lib/header/src/lib.rs
+++ b/lib/header/src/lib.rs
@@ -285,25 +285,23 @@ fn parse_nametable(byte: Option<&u8>, mapper: &Mapper) -> NameTableArrangement {
| Mapper::Mmc3Nec
| Mapper::Mmc3Sharp
| Mapper::Mmc3T9552
- | Mapper::Mmc3c => {
+ | Mapper::Mmc3c
// MMC3 chips can mean a 4-screen nametable arrangement if
// the "alternative nametable layout" bit is set.
- if (b & 0x08) == 0x08 {
+ if (b & 0x08) == 0x08 => {
return NameTableArrangement::FourScreen;
}
- }
- Mapper::Unrom512 => {
+ Mapper::Unrom512
// In UNROM 512 chips, if the "alternative nametable layout"
// bit is set, then it depends on the "nametable
// arrangement" bit to decide whether it's a 1-screen or
// 4-screen layout.
- if (b & 0x08) == 0x08 {
+ if (b & 0x08) == 0x08 => {
if b & 0x1 == 0 {
return NameTableArrangement::OneScreen;
}
return NameTableArrangement::FourScreen;
}
- }
_ => {}
}