From f7147b19f0bc349f79e19dbe4aede4d07a19bf1f Mon Sep 17 00:00:00 2001 From: StackOverflowExcept1on <109800286+StackOverflowExcept1on@users.noreply.github.com> Date: Fri, 15 Sep 2023 19:53:12 +0300 Subject: [PATCH] simplify `if let` --- utils/wasm-gen/src/generator/syscalls/imports.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/utils/wasm-gen/src/generator/syscalls/imports.rs b/utils/wasm-gen/src/generator/syscalls/imports.rs index c84aea44d41..91887407814 100644 --- a/utils/wasm-gen/src/generator/syscalls/imports.rs +++ b/utils/wasm-gen/src/generator/syscalls/imports.rs @@ -214,10 +214,8 @@ impl<'a, 'b> SysCallsImportsGenerator<'a, 'b> { name = InvocableSysCall::Precise(sys_call).to_str() ); - if let Err(err) = generate_method(self, sys_call) { - match err { - PreciseSysCallError::Arbitrary(err) => return Err(err), - } + if let Err(PreciseSysCallError::Arbitrary(err)) = generate_method(self, sys_call) { + return Err(err); } } }