Skip to content

Commit

Permalink
events: make sdk::event::emit_event borrow.
Browse files Browse the repository at this point in the history
  • Loading branch information
raulk committed Nov 13, 2022
1 parent 9c29e6e commit fa75d19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use fvm_shared::event::ActorEvent;

use crate::{sys, SyscallResult};

pub fn emit_event(evt: ActorEvent) -> SyscallResult<()> {
let encoded = fvm_ipld_encoding::to_vec(&evt).expect("failed to marshal actor event");
pub fn emit_event(evt: &ActorEvent) -> SyscallResult<()> {
let encoded = fvm_ipld_encoding::to_vec(evt).expect("failed to marshal actor event");
let entries = encoded.as_slice();

unsafe { sys::event::emit_event(entries.as_ptr(), entries.len() as u32) }
Expand Down

0 comments on commit fa75d19

Please sign in to comment.