Parser - Removed useless clone

This commit is contained in:
Emmanuel BENOîT 2022-12-31 10:14:58 +01:00
parent c0bf521b61
commit 45ed237818

View file

@ -127,7 +127,7 @@ impl Parser {
fn parse_unary(&mut self) -> Result<ast::ExprNode, ParserError> { fn parse_unary(&mut self) -> Result<ast::ExprNode, ParserError> {
if let Some(operator) = self.expect(&[TokenType::Bang, TokenType::Minus]) { if let Some(operator) = self.expect(&[TokenType::Bang, TokenType::Minus]) {
Ok(ast::ExprNode::Unary { Ok(ast::ExprNode::Unary {
operator: operator.clone(), operator,
right: Box::new(self.parse_unary()?), right: Box::new(self.parse_unary()?),
}) })
} else { } else {