[clippy] Pass more types by value;
wasmparser::Type is an enum, and there was one Location I missed.
This commit is contained in:
committed by
Dan Gohman
parent
bea843519c
commit
25508ac66e
@@ -129,7 +129,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
||||
***********************************************************************************/
|
||||
Operator::Block { ty } => {
|
||||
let next = builder.create_ebb();
|
||||
if let Ok(ty_cre) = type_to_type(&ty) {
|
||||
if let Ok(ty_cre) = type_to_type(ty) {
|
||||
builder.append_ebb_param(next, ty_cre);
|
||||
}
|
||||
state.push_block(next, num_return_values(ty));
|
||||
@@ -137,7 +137,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
||||
Operator::Loop { ty } => {
|
||||
let loop_body = builder.create_ebb();
|
||||
let next = builder.create_ebb();
|
||||
if let Ok(ty_cre) = type_to_type(&ty) {
|
||||
if let Ok(ty_cre) = type_to_type(ty) {
|
||||
builder.append_ebb_param(next, ty_cre);
|
||||
}
|
||||
builder.ins().jump(loop_body, &[]);
|
||||
@@ -155,7 +155,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
||||
// and we add nothing;
|
||||
// - either the If have an Else clause, in that case the destination of this jump
|
||||
// instruction will be changed later when we translate the Else operator.
|
||||
if let Ok(ty_cre) = type_to_type(&ty) {
|
||||
if let Ok(ty_cre) = type_to_type(ty) {
|
||||
builder.append_ebb_param(if_not, ty_cre);
|
||||
}
|
||||
state.push_if(jump_inst, if_not, num_return_values(ty));
|
||||
|
||||
Reference in New Issue
Block a user