diff --git a/src/evaluator/env.rs b/src/evaluator/env.rs index 8e09a63..0d70323 100644 --- a/src/evaluator/env.rs +++ b/src/evaluator/env.rs @@ -117,7 +117,7 @@ pub fn core_environment() -> Rc { // We turn the keys into strings because they're hashable // This feels so hacky, but ¯\_(ツ)_/¯ .map(|key| key.to_string()) - .zip(values.into_iter()) + .zip(values) .collect(); Ok(Rc::new(Expression::HashMap(res))) diff --git a/src/evaluator/mod.rs b/src/evaluator/mod.rs index 603b724..807f3b6 100644 --- a/src/evaluator/mod.rs +++ b/src/evaluator/mod.rs @@ -52,7 +52,7 @@ impl std::fmt::Display for Expression { } Expression::HashMap(map) => { let res = map - .into_iter() + .iter() .map(|(k, v)| format!("{k}: {v}")) .reduce(|lhs, rhs| format!("{lhs}, {rhs}")) .unwrap_or_default();