From 8ef2dcda4b2220f43b34202a2d29ed8a425ff583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Mei=C3=9Fner?= Date: Thu, 25 May 2023 19:14:05 +0200 Subject: [PATCH] Replaces `.map()` by `.filter()`. (#468) --- src/elf_parser/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/elf_parser/mod.rs b/src/elf_parser/mod.rs index 8f65f4abc..ab7ed2deb 100644 --- a/src/elf_parser/mod.rs +++ b/src/elf_parser/mod.rs @@ -132,7 +132,7 @@ impl<'a> Elf64<'a> { slice_from_bytes::(elf_bytes, section_header_table_range.clone())?; section_header_table .get(0) - .map(|section_header| section_header.sh_type == SHT_NULL) + .filter(|section_header| section_header.sh_type == SHT_NULL) .ok_or(ElfParserError::InvalidSectionHeader)?; let mut prev_program_header: Option<&Elf64Phdr> = None;