Skip to content

Commit e43e4c1

Browse files
authored
Merge pull request #2174 from hkBst/cfg-select
Replace cfg_if with cfg_select
2 parents fecf710 + 6f88903 commit e43e4c1

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/stdarch-test/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ edition = "2024"
88
assert-instr-macro = { path = "../assert-instr-macro" }
99
simd-test-macro = { path = "../simd-test-macro" }
1010
rustc-demangle = "0.1.8"
11-
cfg-if = "1.0"
1211

1312
[target.'cfg(windows)'.dependencies]
1413
cc = "1.0"

crates/stdarch-test/src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@
66
#![deny(rust_2018_idioms)]
77
#![allow(clippy::missing_docs_in_private_items, clippy::print_stdout)]
88

9-
#[macro_use]
10-
extern crate cfg_if;
11-
129
pub use assert_instr_macro::*;
1310
pub use simd_test_macro::*;
1411
use std::{cmp, collections::HashSet, env, hash, hint::black_box, str, sync::LazyLock};
1512

16-
cfg_if! {
17-
if #[cfg(target_arch = "wasm32")] {
13+
cfg_select! {
14+
target_arch = "wasm32" => {
1815
pub mod wasm;
1916
use wasm::disassemble_myself;
20-
} else {
17+
}
18+
_ => {
2119
mod disassembly;
2220
use crate::disassembly::disassemble_myself;
2321
}

0 commit comments

Comments
 (0)