From 0000903a7d13a3d3f6760cccb5398ba08a771c77 Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Sat, 12 Oct 2019 18:18:45 +0900 Subject: [PATCH] Shut up Clippy --- src/error.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/error.rs b/src/error.rs index 190d20b..60ea733 100644 --- a/src/error.rs +++ b/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, }