Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing errors reported by cargo clippy #126

Merged
merged 2 commits into from Sep 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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