Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Replaces .map() by .filter(). (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso authored May 25, 2023
1 parent 14cd622 commit 8ef2dcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/elf_parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl<'a> Elf64<'a> {
slice_from_bytes::<Elf64Shdr>(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;
Expand Down

0 comments on commit 8ef2dcd

Please sign in to comment.