Allow dead_code/unused_imports when fuzzing

Littering the codebase with `#[cfg(not(fuzzing))]` is a bit messy just
to quieten the linter during fuzzing. Instead just globally allow.
This commit is contained in:
Tobin C. Harding 2022-11-30 15:05:05 +11:00
parent 9266b1bbe0
commit 5a2a37d4be
2 changed files with 6 additions and 0 deletions

View File

@ -46,6 +46,9 @@
#![deny(missing_docs)]
#![deny(unused_must_use)]
// Instead of littering the codebase for non-fuzzing code just globally allow.
#![cfg_attr(fuzzing, allow(dead_code, unused_imports))]
#[cfg(not(any(feature = "std", feature = "no-std")))]
compile_error!("at least one of the `std` or `no-std` features must be enabled");

View File

@ -96,6 +96,9 @@
#![cfg_attr(all(not(test), not(feature = "std")), no_std)]
// Instead of littering the codebase for non-fuzzing code just globally allow.
#![cfg_attr(fuzzing, allow(dead_code, unused_imports))]
#[cfg(bench)] extern crate test;
#[cfg(any(test, feature = "std"))] extern crate core;
#[cfg(feature = "core2")] extern crate core2;