From a4556241de8162aff91eeaffbca348b611c3a595 Mon Sep 17 00:00:00 2001 From: Light Ning Date: Fri, 7 Jun 2019 14:34:07 +0800 Subject: [PATCH] Update deprecated rust range patterns and clippy config (#450) - Fix warning: `...` range patterns are deprecated - Update deprecated cyclomatic-complexity-threshold to cognitive-complexity-threshold --- clippy.toml | 2 +- src/lexer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy.toml b/clippy.toml index c65f45a..5616f26 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1,3 +1,3 @@ -cyclomatic-complexity-threshold = 1337 +cognitive-complexity-threshold = 1337 doc-valid-idents = ["FreeBSD"] diff --git a/src/lexer.rs b/src/lexer.rs index 1fb05b4..f94cc49 100644 --- a/src/lexer.rs +++ b/src/lexer.rs @@ -359,7 +359,7 @@ impl<'a> Lexer<'a> { ' ' | '\t' => self.lex_whitespace(), '\'' => self.lex_raw_string(), '"' => self.lex_cooked_string(), - 'a'...'z' | 'A'...'Z' | '_' => self.lex_name(), + 'a'..='z' | 'A'..='Z' | '_' => self.lex_name(), _ => { self.advance()?; Err(self.error(UnknownStartOfToken))