From 5bdbc2bbb002759eb99d6604a2593cfc38bd65b9 Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 3 May 2021 21:36:32 +0200 Subject: [PATCH] Obeyed our paperclip overlord + fmt --- src/parser/mod.rs | 2 +- src/parser/ops.rs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 609e830c..7692d13a 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -215,7 +215,7 @@ impl<'a> Parser<'a> { let body = self.parse_body()?; - Ok(Stmt::If { cond: cond, body }.into()) + Ok(Stmt::If { cond, body }.into()) } /// Parse loop diff --git a/src/parser/ops.rs b/src/parser/ops.rs index 42c01a9e..bfd0053c 100644 --- a/src/parser/ops.rs +++ b/src/parser/ops.rs @@ -153,10 +153,8 @@ impl<'a> Parser<'a> { self.lexer.next(); return Ok(buf); } - None => return Ok(buf.into()), - Some(t) => { - self.parse_operation(Some(t), buf)? - } + None => return Ok(buf), + Some(t) => self.parse_operation(Some(t), buf)?, }; } }