Fix clippy warnings.
This commit fixes the current set of (stable) clippy warnings in the repo.
This commit is contained in:
committed by
Andrew Brown
parent
1176e4f178
commit
9f506692c2
@@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user