mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-06-27 13:41:58 +00:00
flush
This commit is contained in:
@ -12,6 +12,13 @@ pub struct StackWithLimit<T> where T: Clone {
|
||||
}
|
||||
|
||||
impl<T> StackWithLimit<T> where T: Clone {
|
||||
pub fn with_data(data: Vec<T>, limit: usize) -> Self {
|
||||
StackWithLimit {
|
||||
values: data.into_iter().collect(),
|
||||
limit: limit,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn with_limit(limit: usize) -> Self {
|
||||
StackWithLimit {
|
||||
values: VecDeque::new(),
|
||||
|
Reference in New Issue
Block a user