summaryrefslogtreecommitdiff
path: root/src/eval/scope.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-10-07 19:28:34 +0200
committerLaurenz <laurmaedje@gmail.com>2020-10-07 19:28:34 +0200
commit13230db68c3cb2842f23f95fc1b47fd989e6277d (patch)
treeb0bf94a8e3f935a7e9076237783846dee14e3e81 /src/eval/scope.rs
parentd2e220245d9c17a0ac8c3474984924f65ed6b835 (diff)
Fix some clippy warnings ✔
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.