fix: various clippy lints

This commit is contained in:
Alexis (Poliorcetics) Bourget 2023-05-07 09:43:37 +02:00
parent 900d6030e7
commit d7fdf141a4
5 changed files with 10 additions and 14 deletions

View file

@ -205,7 +205,7 @@ impl<'t> Parser<'t> {
marker.bomb.defuse();
marker = new_marker;
};
self.pos += 1 as usize;
self.pos += 1;
self.push_event(Event::FloatSplitHack { ends_in_dot });
(ends_in_dot, marker)
}

View file

@ -46,10 +46,8 @@ impl<'a> LexedStr<'a> {
// Tag the token as joint if it is float with a fractional part
// we use this jointness to inform the parser about what token split
// event to emit when we encounter a float literal in a field access
if kind == SyntaxKind::FLOAT_NUMBER {
if !self.text(i).ends_with('.') {
res.was_joint();
}
if kind == SyntaxKind::FLOAT_NUMBER && !self.text(i).ends_with('.') {
res.was_joint();
}
}