Fix clippy warnings.

This commit fixes the current set of (stable) clippy warnings in the repo.
This commit is contained in:
Peter Huene
2019-10-23 23:15:42 -07:00
committed by Andrew Brown
parent 1176e4f178
commit 9f506692c2
93 changed files with 667 additions and 662 deletions

View File

@@ -2,6 +2,10 @@ use crate::translation_utils::SignatureIndex;
use cranelift_entity::PrimaryMap;
use std::boxed::Box;
/// Map of signatures to a function's parameter and return types.
pub(crate) type WasmTypes =
PrimaryMap<SignatureIndex, (Box<[wasmparser::Type]>, Box<[wasmparser::Type]>)>;
/// Contains information decoded from the Wasm module that must be referenced
/// during each Wasm function's translation.
///
@@ -14,14 +18,13 @@ pub struct ModuleTranslationState {
///
/// This is used for translating multi-value Wasm blocks inside functions,
/// which are encoded to refer to their type signature via index.
pub(crate) wasm_types:
PrimaryMap<SignatureIndex, (Box<[wasmparser::Type]>, Box<[wasmparser::Type]>)>,
pub(crate) wasm_types: WasmTypes,
}
impl ModuleTranslationState {
/// Creates a new empty ModuleTranslationState.
pub fn new() -> Self {
ModuleTranslationState {
Self {
wasm_types: PrimaryMap::new(),
}
}