From 7caeee7810febf6c538fb2ccdd97f27a35cd6e22 Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Sat, 12 Oct 2019 18:18:45 +0900 Subject: [PATCH] Shut up Clippy --- compiler/src/error.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/compiler/src/error.rs b/compiler/src/error.rs index 190d20b4d..60ea73396 100644 --- a/compiler/src/error.rs +++ b/compiler/src/error.rs @@ -47,13 +47,7 @@ impl CompileError { match parse { ParseErrorType::Lexical(LexicalErrorType::IndentationError) => true, ParseErrorType::UnrecognizedToken(token, expected) => { - if *token == Tok::Indent { - true - } else if expected.clone() == Some("Indent".to_string()) { - true - } else { - false - } + *token == Tok::Indent || expected.clone() == Some("Indent".to_string()) } _ => false, }