Removing vals not working, strangely

This commit is contained in:
Sam Hedin
2020-06-04 04:37:02 +02:00
parent c67d93dae1
commit de0c252e27
2 changed files with 21 additions and 4 deletions

View File

@@ -159,6 +159,10 @@ impl Dictionary {
self.entries.contains_key(key)
}
pub fn remove_key(&mut self, key: &str) -> Option<Value> {
self.entries.remove(key)
}
/// Find the matching Value for a key, if possible
pub fn get_data_by_key(&self, name: Spanned<&str>) -> Option<Value> {
let result = self