Skip to content

Commit

Permalink
small refacto
Browse files Browse the repository at this point in the history
  • Loading branch information
o2sh committed Oct 14, 2020
1 parent e41f33e commit 149ede0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/onefetch/language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ impl Language {

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

let error_margin = f64::EPSILON;

if (total - 0 as f64).abs() < error_margin {
if (total - 0 as f64).abs() < f64::EPSILON {
None
} else {
for (_, val) in stats.iter_mut() {
Expand Down

0 comments on commit 149ede0

Please sign in to comment.