summaryrefslogtreecommitdiff
path: root/src/eval/scope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/scope.rs')
-rw-r--r--src/eval/scope.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eval/scope.rs b/src/eval/scope.rs
index fc530bbb..c0624393 100644
--- a/src/eval/scope.rs
+++ b/src/eval/scope.rs
@@ -6,7 +6,7 @@ use std::fmt::{self, Debug, Formatter};
use super::value::ValueFunc;
/// A map from identifiers to functions.
-#[derive(Clone, PartialEq)]
+#[derive(Default, Clone, PartialEq)]
pub struct Scope {
functions: HashMap<String, ValueFunc>,
}
@@ -15,7 +15,7 @@ impl Scope {
// Create a new empty scope with a fallback function that is invoked when no
// match is found.
pub fn new() -> Self {
- Self { functions: HashMap::new() }
+ Self::default()
}
/// Return the function with the given name if there is one.