Add new_frame method

This commit is contained in:
greg 2018-05-10 22:28:25 -07:00
parent 111657b567
commit e7615fda8b

View File

@ -19,5 +19,11 @@ impl<'a, T, V> StateStack<'a, T, V> where T: Hash + Eq {
(Some(value), _) => Some(value), (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()
}
}
} }