This commit is contained in:
Brian Carroll 2021-10-30 17:52:38 +01:00
parent 7fdaa5b91f
commit b0e0c14dd8
2 changed files with 2 additions and 5 deletions

View file

@ -154,10 +154,7 @@ pub fn replace_code_section(module: &mut Module, code_section_bytes: std::vec::V
let code_section_index = sections
.iter()
.position(|s| match s {
Section::Code(_) => true,
_ => false,
})
.position(|s| matches!(s, Section::Code(_)))
.unwrap();
sections[code_section_index] = Section::Unparsed {