Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clippy: Fix simple warnings. #119

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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