summaryrefslogtreecommitdiff
path: root/src/eval/dict.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/dict.rs')
-rw-r--r--src/eval/dict.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eval/dict.rs b/src/eval/dict.rs
index 03871fa0..9127b2eb 100644
--- a/src/eval/dict.rs
+++ b/src/eval/dict.rs
@@ -61,6 +61,11 @@ impl Dict {
Arc::make_mut(&mut self.0).insert(key, value);
}
+ /// Whether the dictionary contains a specific key.
+ pub fn contains_key(&self, key: &str) -> bool {
+ self.0.contains_key(key)
+ }
+
/// Clear the dictionary.
pub fn clear(&mut self) {
if Arc::strong_count(&self.0) == 1 {