From ab496872beb8dc80c70927c8278b747251f4c64f Mon Sep 17 00:00:00 2001 From: lshlyapnikov <4150346+lshlyapnikov@users.noreply.github.com> Date: Mon, 9 Sep 2019 18:39:50 +0400 Subject: [PATCH] Fixing errors reported by `cargo clippy` (#126) * making `cargo clippy` happy removing unnessary `drop` calls that clippy reported as errors * cleaning up --- src/module/elements.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/module/elements.rs b/src/module/elements.rs index a758b50e..8b4ccd2a 100644 --- a/src/module/elements.rs +++ b/src/module/elements.rs @@ -76,8 +76,7 @@ impl Module { let segment = segment?; match segment.kind { - wasmparser::ElementKind::Passive(ty) => { - drop(ty); + wasmparser::ElementKind::Passive(_) => { bail!("passive element segments not supported yet"); } wasmparser::ElementKind::Active { @@ -222,9 +221,8 @@ impl Emit for ModuleElements { // may want to sort this more intelligently in the future. Otherwise // emitting a segment here is in general much simpler than above as we // know there are no holes. - for (id, segment) in self.arena.iter() { + for (id, _) in self.arena.iter() { cx.indices.push_element(id); - drop((id, segment)); // TODO: sync this with the upstream spec panic!( "encoding a passive element segment requires either \