Simplify the std imports

This commit is contained in:
Luca Barbato 2019-09-17 17:04:49 +02:00
parent 33688eaa10
commit ee35b1848e

View file

@ -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)]