Skip to content

Commit ad62cd1

Browse files
committed
Use required-features instead of required_multi_thread_feature!
1 parent 45b4353 commit ad62cd1

File tree

4 files changed

+2
-12
lines changed

4 files changed

+2
-12
lines changed

spdlog/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ required-features = ["multi-thread"]
9898
[[bench]]
9999
name = "spdlog_rs"
100100
path = "benches/spdlog-rs/spdlog_rs.rs"
101+
required-features = ["multi-thread"]
101102
[[bench]]
102103
name = "spdlog_rs_compare_with_cpp_spdlog"
103104
path = "benches/spdlog-rs/compare_with_cpp_spdlog.rs"
@@ -106,6 +107,7 @@ harness = false
106107
name = "spdlog_rs_compare_with_cpp_spdlog_async"
107108
path = "benches/spdlog-rs/compare_with_cpp_spdlog_async.rs"
108109
harness = false
110+
required-features = ["multi-thread"]
109111
[[bench]]
110112
name = "spdlog_rs_pattern"
111113
path = "benches/spdlog-rs/pattern.rs"

spdlog/benches/common/mod.rs

-8
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ macro_rules! unavailable_bench {
4545
};
4646
}
4747

48-
#[macro_export]
49-
macro_rules! required_multi_thread_feature {
50-
() => {
51-
#[cfg(not(feature = "multi-thread"))]
52-
compile_error!("please rerun `cargo bench` with `--features multi-thread`");
53-
};
54-
}
55-
5648
#[macro_export]
5749
macro_rules! aggregate_bench_main {
5850
() => {

spdlog/benches/spdlog-rs/compare_with_cpp_spdlog_async.rs

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ use spdlog::{
1717
};
1818
use test::black_box;
1919

20-
required_multi_thread_feature!();
21-
2220
fn bench(
2321
policy: OverflowPolicy,
2422
file_name: &str,

spdlog/benches/spdlog-rs/spdlog_rs.rs

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ include!(concat!(
2121
));
2222
use test_utils::*;
2323

24-
required_multi_thread_feature!();
25-
2624
enum Mode {
2725
Sync,
2826
Async,

0 commit comments

Comments
 (0)