From 45ed237818de1428c2172583d28b08e022bd174e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Sat, 31 Dec 2022 10:14:58 +0100 Subject: [PATCH] Parser - Removed useless clone --- src/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.rs b/src/parser.rs index ea2bbed..3656b0e 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -127,7 +127,7 @@ impl Parser { fn parse_unary(&mut self) -> Result { if let Some(operator) = self.expect(&[TokenType::Bang, TokenType::Minus]) { Ok(ast::ExprNode::Unary { - operator: operator.clone(), + operator, right: Box::new(self.parse_unary()?), }) } else {