mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-11-16 15:58:14 +00:00
fix cargo b
failing
this `cfg()` existing makes a regular workspace `cargo b` fail
This commit is contained in:
parent
1c462e3c95
commit
1cada331f0
1 changed files with 9 additions and 1 deletions
|
@ -20,6 +20,13 @@ use cfg_if::cfg_if;
|
|||
/// 1. Copy + paste a `cfg_if` block
|
||||
/// 2. Change it to your benchmark's feature flag
|
||||
/// 3. Change it to your benchmark's type
|
||||
#[allow(
|
||||
clippy::allow_attributes,
|
||||
unused_variables,
|
||||
unused_mut,
|
||||
unreachable_code,
|
||||
reason = "clippy does not account for all cfg()s"
|
||||
)]
|
||||
fn main() {
|
||||
log::init_logger();
|
||||
|
||||
|
@ -27,7 +34,8 @@ fn main() {
|
|||
|
||||
cfg_if! {
|
||||
if #[cfg(not(any(feature = "example")))] {
|
||||
compile_error!("No feature specified. Use `--features $BENCHMARK_FEATURE` when building.");
|
||||
println!("No feature specified. Use `--features $BENCHMARK_FEATURE` when building.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue