mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
Fix NumericLiteral::format
that may produce a invalid literal
This commit is contained in:
parent
04aa3f7e9b
commit
4e8cd4d346
1 changed files with 3 additions and 0 deletions
|
@ -162,6 +162,9 @@ impl<'a> NumericLiteral<'a> {
|
|||
}
|
||||
|
||||
if let Some(suffix) = self.suffix {
|
||||
if output.ends_with('.') {
|
||||
output.push('0');
|
||||
}
|
||||
output.push('_');
|
||||
output.push_str(suffix);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue