From 628815ac0ff840f545d5f25aad20547d6e8e89bc Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Fri, 5 Apr 2019 23:56:55 +0200 Subject: [PATCH] fmt --- src/validation/func.rs | 13 +++++++------ src/validation/mod.rs | 15 +++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/validation/func.rs b/src/validation/func.rs index 4c856f5..9d67812 100644 --- a/src/validation/func.rs +++ b/src/validation/func.rs @@ -211,12 +211,13 @@ impl Compiler { loop { let instruction = &body[context.position]; - self.compile_instruction(context, instruction).map_err(|err| { - Error(format!( - "At instruction {:?}(@{}): {}", - instruction, context.position, err - )) - })?; + self.compile_instruction(context, instruction) + .map_err(|err| { + Error(format!( + "At instruction {:?}(@{}): {}", + instruction, context.position, err + )) + })?; context.position += 1; if context.position == body_len { diff --git a/src/validation/mod.rs b/src/validation/mod.rs index 1edd930..ffea71e 100644 --- a/src/validation/mod.rs +++ b/src/validation/mod.rs @@ -265,14 +265,13 @@ pub fn validate_module(module: Module) -> Result { .bodies() .get(index as usize) .ok_or(Error(format!("Missing body for function {}", index)))?; - let code = - Compiler::compile(&context, function, function_body).map_err(|e| { - let Error(ref msg) = e; - Error(format!( - "Function #{} reading/validation error: {}", - index, msg - )) - })?; + let code = Compiler::compile(&context, function, function_body).map_err(|e| { + let Error(ref msg) = e; + Error(format!( + "Function #{} reading/validation error: {}", + index, msg + )) + })?; code_map.push(code); } }