diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-04 19:21:35 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-04 19:21:35 +0200 |
| commit | f4460f8abd7dee1806cf59b4d3777581a6ed154a (patch) | |
| tree | 8e591d253a537a76f8c309e23b09bf7a9a762fd5 /src/eval/scope.rs | |
| parent | 0f7c70fd93db23ec866ae13aa2f146b7787afabf (diff) | |
Style nits 🎈
Diffstat (limited to 'src/eval/scope.rs')
| -rw-r--r-- | src/eval/scope.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eval/scope.rs b/src/eval/scope.rs index d4b24880..7d69e1fc 100644 --- a/src/eval/scope.rs +++ b/src/eval/scope.rs @@ -3,12 +3,12 @@ use std::collections::HashMap; use std::fmt::{self, Debug, Formatter}; -use super::value::FuncValue; +use super::value::ValueFunc; /// A map from identifiers to functions. #[derive(Clone, PartialEq)] pub struct Scope { - functions: HashMap<String, FuncValue>, + functions: HashMap<String, ValueFunc>, } impl Scope { @@ -19,12 +19,12 @@ impl Scope { } /// Associate the given name with the function. - pub fn insert(&mut self, name: impl Into<String>, function: FuncValue) { + pub fn insert(&mut self, name: impl Into<String>, function: ValueFunc) { self.functions.insert(name.into(), function); } /// Return the function with the given name if there is one. - pub fn func(&self, name: &str) -> Option<&FuncValue> { + pub fn func(&self, name: &str) -> Option<&ValueFunc> { self.functions.get(name) } } |
