From 504bc5d9db3e767aab3e6f340e17047a29c00cc0 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 12 Nov 2026 22:01:00 +0100 Subject: vnf: simplify loop on mmc3 write-allowed register MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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à --- lib/vnf/src/lib.rs | 4 ++-- 1 file 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 { -- cgit v1.2.3