Skip to content

Commit

Permalink
Fixing errors reported by cargo clippy (#126)
Browse files Browse the repository at this point in the history
* making `cargo clippy` happy

removing unnessary `drop` calls that clippy reported as errors

* cleaning up
  • Loading branch information
lshlyapnikov authored and alexcrichton committed Sep 9, 2019
1 parent da63e75 commit ab49687
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/module/elements.rs
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit ab49687

Please sign in to comment.