Skip to content

Commit

Permalink
Merge #119
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bors[bot] and waywardmonkeys authored Aug 31, 2023
2 parents d89ce12 + 06f213b commit a3d5ece
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
// Ratio ops often use other "suspicious" ops
#![allow(clippy::suspicious_arithmetic_impl)]
#![allow(clippy::suspicious_op_assign_impl)]
// These use stdlib features higher than the MSRV
#![allow(clippy::manual_strip)] // 1.45
#![allow(clippy::manual_range_contains)] // 1.35

#[cfg(feature = "std")]
#[macro_use]
Expand Down Expand Up @@ -1041,7 +1044,7 @@ macro_rules! impl_formatting {
format!(concat!($fmt_str, "/", $fmt_str), self.numer, self.denom)
}
};
// TODO: replace with strip_prefix, when stabalized
// TODO: replace with strip_prefix, when stabilized
let (pre_pad, non_negative) = {
if pre_pad.starts_with("-") {
(&pre_pad[1..], false)
Expand Down Expand Up @@ -1706,10 +1709,8 @@ fn hash<T: Hash>(x: &T) -> u64 {
#[cfg(test)]
mod test {
use super::ldexp;
#[cfg(all(feature = "num-bigint"))]
use super::BigInt;
#[cfg(feature = "num-bigint")]
use super::BigRational;
use super::{BigInt, BigRational};
use super::{Ratio, Rational64};

use core::f64;
Expand Down

0 comments on commit a3d5ece

Please sign in to comment.