From 15df47ab0c08e2c7450d0712cc01ea38c3afc8c7 Mon Sep 17 00:00:00 2001 From: Stephan Boyer Date: Tue, 9 Jan 2024 10:34:04 -0800 Subject: [PATCH] Forbid the default numeric fallback --- Cargo.toml | 1 + src/main.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index af87631..906a47e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ readme = "README.md" [lints] clippy.all = "deny" +clippy.default_numeric_fallback = "deny" clippy.pedantic = "deny" rust.warnings = "deny" diff --git a/src/main.rs b/src/main.rs index 7238ab4..89a529d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -63,7 +63,7 @@ impl Threshold { ) }) .and_then(|f| { - if f.is_normal() && (0.0..=100.0).contains(&f) { + if f.is_normal() && (0.0_f64..=100.0_f64).contains(&f) { Ok(f) } else { Err(io::Error::new(