Skip to content

Commit 6dc34c8

Browse files
committed
Simplify the std imports
1 parent ecc775f commit 6dc34c8

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

crates/std_detect/src/lib.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,12 @@
2424
extern crate cfg_if;
2525

2626
cfg_if! {
27-
if #[cfg(all(feature = "std_detect_file_io", feature = "std_detect_env_override"))] {
27+
if #[cfg(any(feature = "std_detect_file_io", feature = "std_detect_env_override"))] {
2828
#[cfg_attr(test, macro_use(println))]
2929
extern crate std;
3030

3131
#[allow(unused_imports)]
3232
use std::{arch, env, fs, io, mem, sync};
33-
} else if #[cfg(feature = "std_detect_file_io")] {
34-
#[cfg_attr(test, macro_use(println))]
35-
extern crate std;
36-
37-
#[allow(unused_imports)]
38-
use std::{arch, fs, io, mem, sync};
39-
} else if #[cfg(feature = "std_detect_env_override")] {
40-
#[cfg_attr(test, macro_use(println))]
41-
extern crate std;
42-
43-
use std::env;
4433
} else {
4534
#[cfg(test)]
4635
#[macro_use(println)]

0 commit comments

Comments
 (0)