Replace a match with a ?.

This commit is contained in:
Dan Gohman
2017-09-11 08:32:02 -07:00
parent a2542ed71d
commit 7bf2747e1e

View File

@@ -220,7 +220,7 @@ pub fn translate_module(
_ => return Err(String::from("wrong content in code section")), _ => return Err(String::from("wrong content in code section")),
}; };
let signature = signatures[functions[function_index]].clone(); let signature = signatures[functions[function_index]].clone();
match translate_function_body( let il_func = translate_function_body(
&mut parser, &mut parser,
function_index, function_index,
&signature, &signature,
@@ -228,10 +228,8 @@ pub fn translate_module(
&exports, &exports,
&mut il_builder, &mut il_builder,
runtime, runtime,
) { )?;
Ok(il_func) => il_functions.push(il_func), il_functions.push(il_func);
Err(s) => return Err(s),
}
function_index += 1; function_index += 1;
} }
loop { loop {