Run cargo +nightly fix --clippy -Z unstable-options

This commit is contained in:
Kirill Bulatov 2020-02-18 14:53:02 +02:00
parent eab80cd961
commit b8ddcb0652
48 changed files with 132 additions and 149 deletions

View file

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