From 968a774c99a73fb689c316c29e6956087d97d5cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Mei=C3=9Fner?= Date: Thu, 12 Oct 2023 19:00:33 +0200 Subject: [PATCH] Makes Result type in declare_builtin_function!() parametric too. --- src/program.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/program.rs b/src/program.rs index a16f32fed..e791cafee 100644 --- a/src/program.rs +++ b/src/program.rs @@ -296,7 +296,7 @@ macro_rules! declare_builtin_function { $arg_d:ident : u64, $arg_e:ident : u64, $memory_mapping:ident : &mut $MemoryMapping:ty, - ) -> Result $rust:tt) => { + ) -> $Result:ty { $($rust:tt)* }) => { $(#[$attr])* pub struct $name {} impl $name { @@ -309,8 +309,8 @@ macro_rules! declare_builtin_function { $arg_d: u64, $arg_e: u64, $memory_mapping: &mut $MemoryMapping, - ) -> Result { - $rust + ) -> $Result { + $($rust)* } /// VM interface #[allow(clippy::too_many_arguments)]