check if a char is whitespace instead of explicitly checking against a few chars, ignore Cargo.lock

This commit is contained in:
Lukáš Hozda 2017-10-02 08:33:47 +02:00
parent b7e4954f00
commit 87b68b79f8
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
target/ target/
Cargo.lock

View File

@ -463,7 +463,7 @@ impl<'a> Iterator for TokenIterator<'a> {
} }
} }
} }
' ' | '\n' | '\r' => (), _x if _x.is_whitespace() => (),
_ => return Some(Token::LexErr(LexError::UnexpectedChar)), _ => return Some(Token::LexErr(LexError::UnexpectedChar)),
} }
} }