Allow unused imports when running bench code

Running the bench code results in a million warnings, instead of
solving these just allow unused imports as we do for fuzz code.
This commit is contained in:
Tobin C. Harding 2024-09-05 12:45:23 +10:00
parent eb67e873e0
commit fe46225ed0
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
3 changed files with 6 additions and 3 deletions

View File

@ -12,8 +12,9 @@
#![cfg_attr(bench, feature(test))] #![cfg_attr(bench, feature(test))]
// Coding conventions. // Coding conventions.
#![warn(missing_docs)] #![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(fuzzing, allow(dead_code, unused_imports))]
#![cfg_attr(bench, allow(dead_code, unused_imports))]
// Exclude lints we don't think are valuable. // Exclude lints we don't think are valuable.
#![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134 #![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. #![allow(clippy::manual_range_contains)] // More readable than clippy's format.

View File

@ -30,8 +30,9 @@
#![cfg_attr(bench, feature(test))] #![cfg_attr(bench, feature(test))]
// Coding conventions. // Coding conventions.
#![warn(missing_docs)] #![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(fuzzing, allow(dead_code, unused_imports))]
#![cfg_attr(bench, allow(dead_code, unused_imports))]
// Exclude lints we don't think are valuable. // Exclude lints we don't think are valuable.
#![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134 #![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. #![allow(clippy::manual_range_contains)] // More readable than clippy's format.

View File

@ -68,8 +68,9 @@
#![cfg_attr(bench, feature(test))] #![cfg_attr(bench, feature(test))]
// Coding conventions. // Coding conventions.
#![warn(missing_docs)] #![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(hashes_fuzz, allow(dead_code, unused_imports))]
#![cfg_attr(bench, allow(dead_code, unused_imports))]
// Exclude lints we don't think are valuable. // Exclude lints we don't think are valuable.
#![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134 #![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. #![allow(clippy::manual_range_contains)] // More readable than clippy's format.