diff --git a/ethcore/evm/src/interpreter/stack.rs b/ethcore/evm/src/interpreter/stack.rs index 3902b8ff7..cf8104fa2 100644 --- a/ethcore/evm/src/interpreter/stack.rs +++ b/ethcore/evm/src/interpreter/stack.rs @@ -66,11 +66,7 @@ impl Stack for VecStack { } fn pop_back(&mut self) -> S { - let val = self.stack.pop(); - match val { - Some(x) => x, - None => panic!("Tried to pop from empty stack.") - } + self.stack.pop().expect("instruction validation prevents from popping too many items; qed") } fn pop_n(&mut self, no_of_elems: usize) -> &[S] {