aya: section: collecting relocations can't fail anymore

pull/1/head
Alessandro Decina 4 years ago
parent 318c16cea3
commit 8b0eee317d

@ -268,15 +268,13 @@ impl<'data, 'file, 'a> TryFrom<&'a ObjSection<'data, 'file>> for Section<'a> {
data: section.data().map_err(map_err)?, data: section.data().map_err(map_err)?,
relocations: section relocations: section
.relocations() .relocations()
.map(|(offset, r)| { .map(|(offset, r)| Relocation {
Ok::<_, ParseError>(Relocation { kind: r.kind(),
kind: r.kind(), target: r.target(),
target: r.target(), addend: r.addend(),
addend: r.addend(), offset,
offset,
})
}) })
.collect::<Result<Vec<_>, _>>()?, .collect::<Vec<_>>(),
}) })
} }
} }

Loading…
Cancel
Save