From 2a6003846d20a450caf05eab1410c82a4a282f08 Mon Sep 17 00:00:00 2001 From: Garrit Franke Date: Wed, 9 Dec 2020 10:25:56 +0100 Subject: [PATCH] Fix warnings --- src/generator/x86.rs | 6 ------ src/parser/node_type.rs | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/generator/x86.rs b/src/generator/x86.rs index c27fc69..06b1815 100644 --- a/src/generator/x86.rs +++ b/src/generator/x86.rs @@ -35,12 +35,6 @@ impl Assembly { self.asm.push(string.into()) } - fn add_all>(&mut self, strings: Vec) { - for string in strings { - self.asm.push(string.into()) - } - } - fn build(&self) -> String { self.asm.join("\n") } diff --git a/src/parser/node_type.rs b/src/parser/node_type.rs index e558c6d..609a38a 100644 --- a/src/parser/node_type.rs +++ b/src/parser/node_type.rs @@ -69,7 +69,7 @@ impl TryFrom for Expression { .map_err(|_| "Int value could not be parsed")?, )), TokenKind::Literal(Value::Str) => Ok(Expression::Str(token.raw)), - other => panic!("Value could not be parsed"), + _ => panic!("Value could not be parsed"), } } } @@ -106,7 +106,6 @@ impl TryFrom for BinOp { TokenKind::LessThanOrEqual => Ok(BinOp::LessThanOrEqual), TokenKind::GreaterThanOrEqual => Ok(BinOp::GreaterThanOrEqual), TokenKind::NotEqual => Ok(BinOp::NotEqual), - TokenKind::Percent => Ok(BinOp::Modulus), TokenKind::And => Ok(BinOp::And), TokenKind::Or => Ok(BinOp::Or), other => Err(format!("Token {:?} cannot be converted into a BinOp", other).into()),