Add new_frame method
This commit is contained in:
parent
111657b567
commit
e7615fda8b
@ -19,5 +19,11 @@ impl<'a, T, V> StateStack<'a, T, V> where T: Hash + Eq {
|
||||
(Some(value), _) => Some(value),
|
||||
}
|
||||
}
|
||||
pub fn new_frame(&'a self) -> StateStack<'a, T, V> where T: Hash + Eq {
|
||||
StateStack {
|
||||
parent: Some(self),
|
||||
values: HashMap::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user