Skip to content

Commit ae22223

Browse files
committed
no longer return Option from Stack::pop{2,3}
1 parent a60b2da commit ae22223

File tree

1 file changed

+4
-4
lines changed
  • crates/wasmi/src/engine/translator/translator2/stack

1 file changed

+4
-4
lines changed

crates/wasmi/src/engine/translator/translator2/stack/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,10 @@ impl Stack {
334334
/// # Panics
335335
///
336336
/// If `self` does not contain enough operands to pop.
337-
pub fn pop2(&mut self) -> Option<(Operand, Operand)> {
337+
pub fn pop2(&mut self) -> (Operand, Operand) {
338338
let o2 = self.pop();
339339
let o1 = self.pop();
340-
Some((o1, o2))
340+
(o1, o2)
341341
}
342342

343343
/// Pops the two top-most [`Operand`] from the [`Stack`].
@@ -349,11 +349,11 @@ impl Stack {
349349
/// # Panics
350350
///
351351
/// If `self` does not contain enough operands to pop.
352-
pub fn pop3(&mut self) -> Option<(Operand, Operand, Operand)> {
352+
pub fn pop3(&mut self) -> (Operand, Operand, Operand) {
353353
let o3 = self.pop();
354354
let o2 = self.pop();
355355
let o1 = self.pop();
356-
Some((o1, o2, o3))
356+
(o1, o2, o3)
357357
}
358358

359359
/// Preserve all locals on the [`Stack`] that refer to `local_index`.

0 commit comments

Comments
 (0)