From e1317322e15ea5ccf8588dcdd6f88482dae01b7c Mon Sep 17 00:00:00 2001 From: Swastick Chowdhury <28708247+Swastickc@users.noreply.github.com> Date: Tue, 24 Nov 2026 15:14:00 +0530 Subject: [PATCH] loader: use as_chunks for PE section headers (#79 follow-up) Rust 1.100 Clippy rejects chunks_exact with a constant size (chunks_exact_to_as_chunks), which fails the pinned cargo clippy -D warnings gate on main since #250. No behavior change. Signed-off-by: Swastick Chowdhury <28708247+Swastickc@users.noreply.github.com> --- crates/loader/src/pe.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/loader/src/pe.rs b/crates/loader/src/pe.rs index 22b0b68..dce5c66 100644 --- a/crates/loader/src/pe.rs +++ b/crates/loader/src/pe.rs @@ -170,7 +170,10 @@ impl ParsedPe { } let mut sections = Vec::with_capacity(usize::from(number_of_sections)); - for sec_bytes in bytes[section_table_offset..table_end].chunks_exact(SECTION_HEADER_SIZE) { + for sec_bytes in bytes[section_table_offset..table_end] + .as_chunks::() + .0 + { // Section name (up to 8 bytes UTF-8 or null-padded ASCII) let name_raw = &sec_bytes[0..8]; let name_len = name_raw.iter().position(|&b| b == 0).unwrap_or(8);