Simplify the std imports
This commit is contained in:
parent
33688eaa10
commit
ee35b1848e
1 changed files with 1 additions and 12 deletions
|
|
@ -24,23 +24,12 @@
|
|||
extern crate cfg_if;
|
||||
|
||||
cfg_if! {
|
||||
if #[cfg(all(feature = "std_detect_file_io", feature = "std_detect_env_override"))] {
|
||||
if #[cfg(any(feature = "std_detect_file_io", feature = "std_detect_env_override"))] {
|
||||
#[cfg_attr(test, macro_use(println))]
|
||||
extern crate std;
|
||||
|
||||
#[allow(unused_imports)]
|
||||
use std::{arch, env, fs, io, mem, sync};
|
||||
} else if #[cfg(feature = "std_detect_file_io")] {
|
||||
#[cfg_attr(test, macro_use(println))]
|
||||
extern crate std;
|
||||
|
||||
#[allow(unused_imports)]
|
||||
use std::{arch, fs, io, mem, sync};
|
||||
} else if #[cfg(feature = "std_detect_env_override")] {
|
||||
#[cfg_attr(test, macro_use(println))]
|
||||
extern crate std;
|
||||
|
||||
use std::env;
|
||||
} else {
|
||||
#[cfg(test)]
|
||||
#[macro_use(println)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue