Update deprecated rust range patterns and clippy config (#450)

- Fix warning: `...` range patterns are deprecated
- Update deprecated cyclomatic-complexity-threshold to cognitive-complexity-threshold
This commit is contained in:
Light Ning 2019-06-07 14:34:07 +08:00 committed by Casey Rodarmor
parent 23443e2472
commit a4556241de
2 changed files with 2 additions and 2 deletions

View File

@ -1,3 +1,3 @@
cyclomatic-complexity-threshold = 1337
cognitive-complexity-threshold = 1337
doc-valid-idents = ["FreeBSD"]

View File

@ -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))