Skip to content

Commit a3d5ece

Browse files
Merge #119
119: clippy: Fix simple warnings. r=cuviper a=waywardmonkeys * Suppress some suggestions that require a higher MSRV. * Simplify a `cfg` / `use`. Co-authored-by: Bruce Mitchener <bruce.mitchener@gmail.com>
2 parents d89ce12 + 06f213b commit a3d5ece

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
// Ratio ops often use other "suspicious" ops
2020
#![allow(clippy::suspicious_arithmetic_impl)]
2121
#![allow(clippy::suspicious_op_assign_impl)]
22+
// These use stdlib features higher than the MSRV
23+
#![allow(clippy::manual_strip)] // 1.45
24+
#![allow(clippy::manual_range_contains)] // 1.35
2225

2326
#[cfg(feature = "std")]
2427
#[macro_use]
@@ -1041,7 +1044,7 @@ macro_rules! impl_formatting {
10411044
format!(concat!($fmt_str, "/", $fmt_str), self.numer, self.denom)
10421045
}
10431046
};
1044-
// TODO: replace with strip_prefix, when stabalized
1047+
// TODO: replace with strip_prefix, when stabilized
10451048
let (pre_pad, non_negative) = {
10461049
if pre_pad.starts_with("-") {
10471050
(&pre_pad[1..], false)
@@ -1706,10 +1709,8 @@ fn hash<T: Hash>(x: &T) -> u64 {
17061709
#[cfg(test)]
17071710
mod test {
17081711
use super::ldexp;
1709-
#[cfg(all(feature = "num-bigint"))]
1710-
use super::BigInt;
17111712
#[cfg(feature = "num-bigint")]
1712-
use super::BigRational;
1713+
use super::{BigInt, BigRational};
17131714
use super::{Ratio, Rational64};
17141715

17151716
use core::f64;

0 commit comments

Comments
 (0)