diff --git a/Cargo.toml b/Cargo.toml index 12d168c..4b7ae6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,3 +64,6 @@ std = ["num-bigint/std", "num-integer/std", "num-traits/std"] [lints.rust] unexpected_cfgs = { level = "allow", check-cfg = ['cfg(no_track_caller)'] } + +[lints.clippy] +redundant_closure_for_method_calls = "deny" diff --git a/src/impl_num.rs b/src/impl_num.rs index ac5df68..c9cc23f 100644 --- a/src/impl_num.rs +++ b/src/impl_num.rs @@ -204,7 +204,7 @@ impl ToPrimitive for BigDecimalRef<'_> { scale -= 19; } - match scale.to_i32().and_then(|x| x.checked_neg()) { + match scale.to_i32().and_then(i32::checked_neg) { Some(pow) if 0 <= pow => { // 'simple' integer case let f = int_cow.to_f64().map(copy_sign_to_float)?;