From f121d6f599ccfbd8948f266c8efc58a3e44f6ace Mon Sep 17 00:00:00 2001 From: Brian Carroll Date: Sun, 14 Nov 2021 13:21:56 +0000 Subject: [PATCH] Fix formatting --- compiler/gen_wasm/src/wasm_module/code_builder.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/compiler/gen_wasm/src/wasm_module/code_builder.rs b/compiler/gen_wasm/src/wasm_module/code_builder.rs index ed2a850576..660f612bdf 100644 --- a/compiler/gen_wasm/src/wasm_module/code_builder.rs +++ b/compiler/gen_wasm/src/wasm_module/code_builder.rs @@ -63,8 +63,11 @@ struct VmBlock<'a> { impl std::fmt::Debug for VmBlock<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let result = if self.has_result { "Result" } else { "NoResult" }; - f.write_fmt(format_args!("{:?} {}", self.opcode, result)) + f.write_fmt(format_args!("{:?} {}", self.opcode, if self.has_result { + "Result" + } else { + "NoResult" + })) } } @@ -308,7 +311,10 @@ impl<'a> CodeBuilder<'a> { self.add_insertion(pushed_at, SETLOCAL, next_local_id.0); } else { if ENABLE_DEBUG_LOG { - println!("{:?} has been popped implicitly. Leaving it on the stack.", symbol); + println!( + "{:?} has been popped implicitly. Leaving it on the stack.", + symbol + ); } self.add_insertion(pushed_at, TEELOCAL, next_local_id.0); }