Skip to content

Commit 85002b0

Browse files
committed
handle exponent without digits
1 parent 60258b0 commit 85002b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/numeric_literal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl<'a> NumericLiteral<'a> {
161161
}
162162

163163
if let Some((separator, exponent)) = self.exponent {
164-
if exponent != "0" {
164+
if !exponent.is_empty() && exponent != "0" {
165165
output.push_str(separator);
166166
Self::group_digits(&mut output, exponent, group_size, true, false);
167167
}

0 commit comments

Comments
 (0)