diff --git a/units/Cargo.toml b/units/Cargo.toml index e3bd679a8..021ed1f58 100644 --- a/units/Cargo.toml +++ b/units/Cargo.toml @@ -36,6 +36,9 @@ rustdoc-args = ["--cfg", "docsrs"] unexpected_cfgs = { level = "deny", check-cfg = ['cfg(kani)'] } [lints.clippy] +# Exclude lints we don't think are valuable. +needless_question_mark = "allow" # https://github.com/rust-bitcoin/rust-bitcoin/pull/2134 +manual_range_contains = "allow" # More readable than clippy's format. # Exhaustive list of pedantic clippy lints assigning_clones = "warn" bool_to_int_with_if = "warn" diff --git a/units/src/amount/serde.rs b/units/src/amount/serde.rs index 46fa2f92f..7eb35f6e4 100644 --- a/units/src/amount/serde.rs +++ b/units/src/amount/serde.rs @@ -405,7 +405,7 @@ mod tests { assert_eq!(json, want); let rinsed: HasAmount = serde_json::from_str(&json).expect("failed to deser"); - assert_eq!(rinsed, orig) + assert_eq!(rinsed, orig); } #[test] @@ -424,7 +424,7 @@ mod tests { assert_eq!(json, want); let rinsed: HasAmount = serde_json::from_str(&json).expect("failed to deser"); - assert_eq!(rinsed, orig) + assert_eq!(rinsed, orig); } #[test] diff --git a/units/src/lib.rs b/units/src/lib.rs index d53bc76d0..e4bd1254b 100644 --- a/units/src/lib.rs +++ b/units/src/lib.rs @@ -11,9 +11,6 @@ #![warn(missing_docs)] #![warn(deprecated_in_future)] #![doc(test(attr(warn(unused))))] -// Exclude lints we don't think are valuable. -#![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134 -#![allow(clippy::manual_range_contains)] // More readable than clippy's format. #[cfg(feature = "alloc")] extern crate alloc;