Skip to content

Commit

Permalink
Merge pull request #102 from dtolnay/floatdot
Browse files Browse the repository at this point in the history
Revert "Avoid trailing '.' on non-macro float literals"
  • Loading branch information
dtolnay authored Jan 12, 2025
2 parents 99d37c5 + 281784a commit 78b9b40
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/lit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,7 @@ impl Printer {
}

fn lit_float(&mut self, lit: &LitFloat) {
let repr = lit.token().to_string();
let dot = repr.ends_with('.');
self.word(repr);
if dot {
self.word("0");
}
self.word(lit.token().to_string());
}

fn lit_bool(&mut self, lit: &LitBool) {
Expand Down

0 comments on commit 78b9b40

Please # to comment.