1
0
mirror of https://github.com/fluencelabs/parity-wasm synced 2025-07-20 00:42:01 +00:00
This commit is contained in:
Svyatoslav Nikolsky
2017-06-19 12:35:17 +03:00
parent ad390c95fd
commit 8a17a012c5
8 changed files with 39 additions and 54 deletions

@@ -46,14 +46,12 @@ impl<T> StackWithLimit<T> where T: Clone {
self.values
.back()
.ok_or(Error::Stack("non-empty stack expected".into()))
.map_err(|e| { panic!("1") })
}
pub fn top_mut(&mut self) -> Result<&mut T, Error> {
self.values
.back_mut()
.ok_or(Error::Stack("non-empty stack expected".into()))
.map_err(|e| { panic!("2") })
}
pub fn get(&self, index: usize) -> Result<&T, Error> {
@@ -90,7 +88,6 @@ impl<T> StackWithLimit<T> where T: Clone {
self.values
.pop_back()
.ok_or(Error::Stack("non-empty stack expected".into()))
.map_err(|e| { panic!("3") })
}
pub fn resize(&mut self, new_size: usize, dummy: T) {