From 8b0eee317d71f0139ec030b1f0583edf8670c296 Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Thu, 25 Feb 2021 19:52:23 +0000 Subject: [PATCH] aya: section: collecting relocations can't fail anymore --- aya/src/obj/mod.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs index 890cf87b..81a62ed3 100644 --- a/aya/src/obj/mod.rs +++ b/aya/src/obj/mod.rs @@ -268,15 +268,13 @@ impl<'data, 'file, 'a> TryFrom<&'a ObjSection<'data, 'file>> for Section<'a> { data: section.data().map_err(map_err)?, relocations: section .relocations() - .map(|(offset, r)| { - Ok::<_, ParseError>(Relocation { - kind: r.kind(), - target: r.target(), - addend: r.addend(), - offset, - }) + .map(|(offset, r)| Relocation { + kind: r.kind(), + target: r.target(), + addend: r.addend(), + offset, }) - .collect::, _>>()?, + .collect::>(), }) } }