Skip to content

Commit

Permalink
Merge branch 'benches' into helper-bench
Browse files Browse the repository at this point in the history
  • Loading branch information
hinto-janai committed Oct 26, 2024
2 parents 9ea41c3 + 54354f7 commit c8c1c2e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion benches/benchmark/bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@ 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();

let mut timings = timings::Timings::new();

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;
}
}

Expand Down

0 comments on commit c8c1c2e

Please sign in to comment.