Replace a match with a .unwrap_or_default().

This commit is contained in:
Dan Gohman
2017-09-11 08:31:35 -07:00
parent 47bc963ba5
commit a2542ed71d

View File

@@ -192,10 +192,7 @@ pub fn translate_module(
}
// At this point we've entered the code section
// First we check that we have all that is necessary to translate a function.
let signatures = match signatures {
None => Vec::new(),
Some(sigs) => sigs,
};
let signatures = signatures.unwrap_or_default();
let functions = match functions {
None => return Err(String::from("missing a function section")),
Some(functions) => functions,