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