Skip to content

Commit

Permalink
Makes Result type in declare_builtin_function!() parametric too.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Oct 12, 2023
1 parent c41b8aa commit d3f355f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ macro_rules! declare_builtin_function {
$arg_d:ident : u64,
$arg_e:ident : u64,
$memory_mapping:ident : &mut $MemoryMapping:ty,
) -> Result<u64, $Error:ty> $rust:tt) => {
) -> $Result:ty { $($rust:tt)* }) => {
$(#[$attr])*
pub struct $name {}
impl $name {
Expand All @@ -309,8 +309,8 @@ macro_rules! declare_builtin_function {
$arg_d: u64,
$arg_e: u64,
$memory_mapping: &mut $MemoryMapping,
) -> Result<u64, $Error> {
$rust
) -> $Result {
$($rust)*
}
/// VM interface
#[allow(clippy::too_many_arguments)]
Expand Down

0 comments on commit d3f355f

Please sign in to comment.