From 875545517dd6514b67cd42bd08f00f1256f19e7d Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Fri, 20 Oct 2023 15:58:42 +0100 Subject: [PATCH] Add clippy exceptions for needless_question_mark lint --- bitcoin/src/lib.rs | 2 ++ hashes/src/lib.rs | 2 ++ internals/src/lib.rs | 2 ++ 3 files changed, 6 insertions(+) diff --git a/bitcoin/src/lib.rs b/bitcoin/src/lib.rs index dfdf4ad0..68b7d246 100644 --- a/bitcoin/src/lib.rs +++ b/bitcoin/src/lib.rs @@ -38,6 +38,8 @@ #![warn(missing_docs)] // Instead of littering the codebase for non-fuzzing code just globally allow. #![cfg_attr(fuzzing, allow(dead_code, unused_imports))] +// Exclude clippy lints we don't think are valuable +#![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134 #[cfg(not(any(feature = "std", feature = "no-std")))] compile_error!("at least one of the `std` or `no-std` features must be enabled"); diff --git a/hashes/src/lib.rs b/hashes/src/lib.rs index 667d2df9..aa1c6ffc 100644 --- a/hashes/src/lib.rs +++ b/hashes/src/lib.rs @@ -78,6 +78,8 @@ #![cfg_attr(all(not(test), not(feature = "std")), no_std)] // Instead of littering the codebase for non-fuzzing code just globally allow. #![cfg_attr(hashes_fuzz, allow(dead_code, unused_imports))] +// Exclude clippy lints we don't think are valuable +#![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134 #[cfg(all(not(test), not(feature = "std"), feature = "core2"))] extern crate actual_core2 as core2; diff --git a/internals/src/lib.rs b/internals/src/lib.rs index a024e273..b81da6b8 100644 --- a/internals/src/lib.rs +++ b/internals/src/lib.rs @@ -11,6 +11,8 @@ #![cfg_attr(docsrs, feature(doc_auto_cfg))] // Coding conventions #![warn(missing_docs)] +// Exclude clippy lints we don't think are valuable +#![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134 #[cfg(feature = "alloc")] extern crate alloc;