Skip to content

Commit 517c25c

Browse files
committed
clippy fix: replace manual impl by fn call
1 parent 819d4a3 commit 517c25c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/num/dec2flt/lemire.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub fn compute_float<F: RawFloat>(q: i64, mut w: u64) -> BiasedFp {
5555
// <https://arxiv.org/pdf/2101.11408.pdf#section.9.1>. For detailed
5656
// explanations of rounding for positive exponents, see
5757
// <https://arxiv.org/pdf/2101.11408.pdf#section.8>.
58-
let inside_safe_exponent = (q >= -27) && (q <= 55);
58+
let inside_safe_exponent = (-27..=55).contains(&q);
5959
if !inside_safe_exponent {
6060
return fp_error;
6161
}

0 commit comments

Comments
 (0)