[clippy] Pass more types by value;

wasmparser::Type is an enum, and there was one Location I missed.
This commit is contained in:
Benjamin Bouvier
2018-07-10 15:41:59 +02:00
committed by Dan Gohman
parent bea843519c
commit 25508ac66e
4 changed files with 14 additions and 14 deletions

View File

@@ -72,8 +72,8 @@ pub struct Memory {
}
/// Helper function translating wasmparser types to Cretonne types when possible.
pub fn type_to_type(ty: &wasmparser::Type) -> Result<ir::Type, ()> {
match *ty {
pub fn type_to_type(ty: wasmparser::Type) -> Result<ir::Type, ()> {
match ty {
wasmparser::Type::I32 => Ok(ir::types::I32),
wasmparser::Type::I64 => Ok(ir::types::I64),
wasmparser::Type::F32 => Ok(ir::types::F32),