diff --git a/base58/src/lib.rs b/base58/src/lib.rs index 19ed85306..3677bd2d8 100644 --- a/base58/src/lib.rs +++ b/base58/src/lib.rs @@ -12,8 +12,9 @@ #![cfg_attr(bench, feature(test))] // Coding conventions. #![warn(missing_docs)] -// Instead of littering the codebase for non-fuzzing code just globally allow. +// Instead of littering the codebase for non-fuzzing and bench code just globally allow. #![cfg_attr(fuzzing, allow(dead_code, unused_imports))] +#![cfg_attr(bench, allow(dead_code, unused_imports))] // 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. diff --git a/bitcoin/src/lib.rs b/bitcoin/src/lib.rs index 9ccc3c7ed..8ebd84bce 100644 --- a/bitcoin/src/lib.rs +++ b/bitcoin/src/lib.rs @@ -30,8 +30,9 @@ #![cfg_attr(bench, feature(test))] // Coding conventions. #![warn(missing_docs)] -// Instead of littering the codebase for non-fuzzing code just globally allow. +// Instead of littering the codebase for non-fuzzing and bench code just globally allow. #![cfg_attr(fuzzing, allow(dead_code, unused_imports))] +#![cfg_attr(bench, allow(dead_code, unused_imports))] // 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. diff --git a/hashes/src/lib.rs b/hashes/src/lib.rs index eb979a4d4..739a17d16 100644 --- a/hashes/src/lib.rs +++ b/hashes/src/lib.rs @@ -68,8 +68,9 @@ #![cfg_attr(bench, feature(test))] // Coding conventions. #![warn(missing_docs)] -// Instead of littering the codebase for non-fuzzing code just globally allow. +// Instead of littering the codebase for non-fuzzing and bench code just globally allow. #![cfg_attr(hashes_fuzz, allow(dead_code, unused_imports))] +#![cfg_attr(bench, allow(dead_code, unused_imports))] // 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.