diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-11-12 22:01:00 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-11-12 22:01:00 +0100 |
| commit | 504bc5d9db3e767aab3e6f340e17047a29c00cc0 (patch) | |
| tree | 231c6a1ee38d215e86d1625c3d3ec8d3d9c14b0f | |
| parent | 3cfacacf75ba79037a1e86310cf4df7a2b0d5347 (diff) | |
| download | tools.nes-main.tar.gz tools.nes-main.zip | |
After upgrading to Rust 1.100, clippy suddenly complained about a loop
where the index was not being used, and a simpler way to write it could
have been used. This is just using the recommended path for it.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
| -rw-r--r-- | lib/vnf/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vnf/src/lib.rs b/lib/vnf/src/lib.rs index 7b6dda8..61995ee 100644 --- a/lib/vnf/src/lib.rs +++ b/lib/vnf/src/lib.rs @@ -1804,8 +1804,8 @@ impl Machine { }; self.working_ram = vec![cell; 0x2000]; } else if before != chip.prg_ram_writes_allowed { - for i in 0..0x2000 { - self.working_ram[i].write_allowed = chip.prg_ram_writes_allowed; + for cell in self.working_ram.iter_mut().take(0x2000) { + cell.write_allowed = chip.prg_ram_writes_allowed; } } } else { |
