]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/float_literal.rs
Rollup merge of #83228 - GuillaumeGomez:no-diff-if-no-tidy, r=jyn514
[rust.git] / src / tools / clippy / clippy_lints / src / float_literal.rs
index be646cbe4d043659bed1a879e8e3f07836090feb..8e256f346841947d6c075f110aab2345afaa6871 100644 (file)
@@ -145,11 +145,7 @@ fn count_digits(s: &str) -> usize {
         .take_while(|c| *c != 'e' && *c != 'E')
         .fold(0, |count, c| {
             // leading zeros
-            if c == '0' && count == 0 {
-                count
-            } else {
-                count + 1
-            }
+            if c == '0' && count == 0 { count } else { count + 1 }
         })
 }