Skip to content

Commit 9bd6e89

Browse files
o2shspenserblack
andauthored
refacto total == 0 condition
Co-authored-by: Spenser Black <[email protected]>
1 parent 149ede0 commit 9bd6e89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/onefetch/language.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ impl Language {
185185

186186
let total: f64 = stats.iter().map(|(_, v)| v).sum();
187187

188-
if (total - 0 as f64).abs() < f64::EPSILON {
188+
if total.abs() < f64::EPSILON {
189189
None
190190
} else {
191191
for (_, val) in stats.iter_mut() {

0 commit comments

Comments
 (0)