Skip to content

Commit

Permalink
expand unecessary macro
Browse files Browse the repository at this point in the history
  • Loading branch information
nomaxg committed Nov 27, 2023
1 parent 4272a4f commit 46fe352
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions arbitrator/jit/src/wavmio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,11 @@ fn read_hotshot_commitment_impl(
return Ok(());
}

macro_rules! error {
($text:expr $(,$args:expr)*) => {{
let text = format!($text $(,$args)*);
return Escape::hostio(&text)
}};
}

let message = comm_map.get(&msg_num).unwrap_or(&[0; 32]);

if out_ptr + 32 > sp.memory_size() {
error!("memory bounds exceeded in {name}");
let text = format!("memory bounds exceeded in {}", name);
return Escape::hostio(&text);
}
sp.write_slice(out_ptr, message);
sp.write_u64(5, 32);
Expand Down

0 comments on commit 46fe352

Please sign in to comment.