From a2542ed71d329f9482f53bc44ec15e6bb5ae2126 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 11 Sep 2017 08:31:35 -0700 Subject: [PATCH] Replace a match with a .unwrap_or_default(). --- lib/wasm/src/module_translator.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/wasm/src/module_translator.rs b/lib/wasm/src/module_translator.rs index 113330d4cf..b66e896380 100644 --- a/lib/wasm/src/module_translator.rs +++ b/lib/wasm/src/module_translator.rs @@ -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,