Skip to content

Commit

Permalink
sidevm: Remove the second &mut *guard
Browse files Browse the repository at this point in the history
  • Loading branch information
kvinwang committed Oct 12, 2022
1 parent 9d6bb11 commit 92bdb40
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/sidevm/host-runtime/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,6 @@ fn sidevm_ocall_fast_return(
env::dispatch_call_fast_return(&mut state, &vm, func_id, p0, p1, p2, p3)
});

let env = &mut *guard;
if env.ocall_trace_enabled {
let func_name = env::ocall_id2name(func_id);
let vm_id = ShortId(&env.id);
Expand Down Expand Up @@ -682,7 +681,7 @@ fn sidevm_ocall(
let mut state = env.make_mut(&mut func_env);
env::dispatch_call(&mut state, &vm, func_id, p0, p1, p2, p3)
});
let env = &mut *guard;

if env.ocall_trace_enabled {
let func_name = env::ocall_id2name(func_id);
let vm_id = ShortId(&env.id);
Expand Down

0 comments on commit 92bdb40

Please sign in to comment.