about summary refs log tree commit diff
diff options
context:
space:
mode:
authorroife <roifewu@gmail.com>2024-03-06 23:12:27 +0800
committerroife <roifewu@gmail.com>2024-03-06 23:32:40 +0800
commit91d181feffc6970b9cc600c4e43ff9b06276c7b3 (patch)
tree5c52bfa6e00de171540224ebb3b619ca0df5d185
parente2daee61bcc15dde70c9d2ee4d1c86207a5e83ea (diff)
downloadrust-91d181feffc6970b9cc600c4e43ff9b06276c7b3.tar.gz
rust-91d181feffc6970b9cc600c4e43ff9b06276c7b3.zip
minor: fmt and clippy
-rw-r--r--crates/parser/src/shortcuts.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/parser/src/shortcuts.rs b/crates/parser/src/shortcuts.rs
index 2beb3c3ef0d..cc2b63d1e66 100644
--- a/crates/parser/src/shortcuts.rs
+++ b/crates/parser/src/shortcuts.rs
@@ -221,17 +221,13 @@ impl Builder<'_, '_> {
                 // we should emit an error node here
                 (self.sink)(StrStep::Error { msg: "illegal float literal", pos: self.pos });
                 (self.sink)(StrStep::Enter { kind: SyntaxKind::ERROR });
-                (self.sink)(StrStep::Token { kind: SyntaxKind::FLOAT_NUMBER, text: text });
+                (self.sink)(StrStep::Token { kind: SyntaxKind::FLOAT_NUMBER, text });
                 (self.sink)(StrStep::Exit);
 
                 // move up
                 (self.sink)(StrStep::Exit);
 
-                self.state = if has_pseudo_dot {
-                    State::Normal
-                } else {
-                    State::PendingExit
-                };
+                self.state = if has_pseudo_dot { State::Normal } else { State::PendingExit };
             }
         }