diff --git a/src/executor.rs b/src/executor.rs index fbe8c17..75930cd 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -76,7 +76,7 @@ impl>> Executor { fn exec( &mut self, tree: Box, - locals: &mut Cow>) -> Result + locals: &mut Cow>>) -> Result { match *tree { ParseTree::Add(x, y) => match (self.exec(x, locals)?, self.exec(y, locals)?) { @@ -304,7 +304,7 @@ impl>> Iterator for Executor let expr = self.exprs.next(); match expr { - Some(Ok(expr)) => Some(self.exec(Box::new(expr), &mut Cow::Borrowed(&HashMap::new()))), + Some(Ok(expr)) => Some(self.exec(Box::new(expr), &mut Cow::Borrowed(&Box::new(HashMap::new())))), Some(Err(e)) => Some(Err(RuntimeError::ParseError(e))), None => None, }