From b8ddcb0652f3ec8683023afc1e1f5166d6a712f4 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 18 Feb 2020 14:53:02 +0200 Subject: Run cargo +nightly fix --clippy -Z unstable-options --- crates/ra_syntax/src/parsing/text_token_source.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_syntax/src/parsing') diff --git a/crates/ra_syntax/src/parsing/text_token_source.rs b/crates/ra_syntax/src/parsing/text_token_source.rs index e793f93a4..e2433913c 100644 --- a/crates/ra_syntax/src/parsing/text_token_source.rs +++ b/crates/ra_syntax/src/parsing/text_token_source.rs @@ -48,7 +48,7 @@ impl<'t> TokenSource for TextTokenSource<'t> { fn is_keyword(&self, kw: &str) -> bool { let pos = self.curr.1; - if !(pos < self.tokens.len()) { + if pos >= self.tokens.len() { return false; } let range = TextRange::offset_len(self.start_offsets[pos], self.tokens[pos].len); -- cgit v1.2.3