mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
fix: various clippy lints
This commit is contained in:
parent
900d6030e7
commit
d7fdf141a4
5 changed files with 10 additions and 14 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue