From ea0e4670f0a76da77829dc28ee209e417bd49c27 Mon Sep 17 00:00:00 2001 From: Urhengulas Date: Fri, 12 Feb 2021 00:07:09 +0100 Subject: [PATCH] Skip alloc of additional data structure https://rust-lang.github.io/rust-clippy/stable/index.html#needless_collect --- decoder/src/elf2table/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/decoder/src/elf2table/mod.rs b/decoder/src/elf2table/mod.rs index 0285de4f..af91dabc 100644 --- a/decoder/src/elf2table/mod.rs +++ b/decoder/src/elf2table/mod.rs @@ -160,7 +160,6 @@ impl fmt::Debug for Location { pub type Locations = BTreeMap; pub fn get_locations(elf: &[u8], table: &Table) -> Result { - let live_syms = table.raw_symbols().collect::>(); let object = object::File::parse(elf)?; let endian = if object.is_little_endian() { gimli::RunTimeEndian::Little @@ -279,7 +278,7 @@ pub fn get_locations(elf: &[u8], table: &Table) -> Result