aboutsummaryrefslogtreecommitdiff
path: root/rust/src/step2_eval.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/step2_eval.rs')
-rw-r--r--rust/src/step2_eval.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/rust/src/step2_eval.rs b/rust/src/step2_eval.rs
index 5df9a94..8d28a0f 100644
--- a/rust/src/step2_eval.rs
+++ b/rust/src/step2_eval.rs
@@ -6,6 +6,7 @@ extern crate regex;
use std::rc::Rc;
use std::collections::HashMap;
+
use types::{MalVal,MalRet,Nil,Int,Sym,List,Func};
mod readline;
mod types;
@@ -21,7 +22,7 @@ fn read(str: String) -> MalRet {
fn eval_ast(ast: MalVal, env: &HashMap<String,MalVal>) -> MalRet {
match *ast {
Sym(ref sym) => {
- match (*env).find_copy(sym) {
+ match env.find_copy(sym) {
Some(mv) => Ok(mv),
None => Ok(Rc::new(Nil)),
}