about summary refs log tree commit diff
path: root/src/parse/ast
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/ast')
-rw-r--r--src/parse/ast/expression.rs4
-rw-r--r--src/parse/ast/statement.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/parse/ast/expression.rs b/src/parse/ast/expression.rs
index e883aaa..e67150a 100644
--- a/src/parse/ast/expression.rs
+++ b/src/parse/ast/expression.rs
@@ -52,7 +52,7 @@ impl Display for Expression {
 impl Expression {
     pub(crate) fn nested_fmt(&self, f: &mut Formatter<'_>, depth: usize) -> fmt::Result {
         let pad = "  ".repeat(depth);
-        match self.kind {
+        match &self.kind {
             ExpressionKind::Binary { left, op, right } => {
                 writeln!(f, "{}Binary:", pad)?;
                 writeln!(f, "{}- Left:", pad)?;
@@ -100,7 +100,7 @@ impl Expression {
                 writeln!(f, "{}Str:", pad)?;
                 for (i, statement) in expr.parts.iter().enumerate() {
                     writeln!(f, "{}- {}:", pad, i)?;
-                    match statement.kind {
+                    match &statement.kind {
                         StrPartKind::Literal(literal) => {
                             writeln!(f, "{}{}", "  ".repeat(depth + 1), literal.clone())
                         }
diff --git a/src/parse/ast/statement.rs b/src/parse/ast/statement.rs
index 7eb9978..7ed91dc 100644
--- a/src/parse/ast/statement.rs
+++ b/src/parse/ast/statement.rs
@@ -32,7 +32,7 @@ impl Statement {
         depth: usize,
     ) -> std::fmt::Result {
         let pad = "  ".repeat(depth);
-        match self.kind {
+        match &self.kind {
             StatementKind::Expression(expression) => expression.nested_fmt(f, depth)?,
             StatementKind::Print(expression) => {
                 writeln!(f, "{}Print:", pad)?;