Skip to content

Commit 2ef73a8

Browse files
committed
use unreachable_unchecked in CallStack::pop
1 parent 24df372 commit 2ef73a8

File tree

1 file changed

+1
-1
lines changed
  • crates/wasmi/src/engine/executor/handler

1 file changed

+1
-1
lines changed

crates/wasmi/src/engine/executor/handler/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ impl CallStack {
419419

420420
fn pop(&mut self) -> Option<(Ip, usize, Option<NonNull<InstanceEntity>>)> {
421421
let Some(popped) = self.frames.pop() else {
422-
panic!("unexpected empty frame stack") // TODO: return `Result` instead of panicking
422+
unsafe { unreachable_unchecked!("call stack must not be empty") }
423423
};
424424
let top = self.top()?;
425425
let ip = top.ip;

0 commit comments

Comments
 (0)