diff --git a/stylus-proc/src/macros/public/types.rs b/stylus-proc/src/macros/public/types.rs index 5088166e..0367e363 100644 --- a/stylus-proc/src/macros/public/types.rs +++ b/stylus-proc/src/macros/public/types.rs @@ -333,10 +333,9 @@ impl PublicFn { if matches!(self.kind, FnKind::FallbackNoArgs) { return parse_quote! { return Some({ - if let Err(err) = Self::#name(#storage_arg) { - Err(err) - } else { - Ok(Vec::new()) + match Self::#name(#storage_arg) { + Ok(()) => Ok(Vec::new()), + Err(err) => Err(err), } }); };