Remove need for #[macro_use] with cfg-if

Modernizes usage of `cfg_if!` slightly
This commit is contained in:
Alex Crichton
2019-09-24 12:13:35 -07:00
committed by gnzlbg
parent cd7aa7720a
commit 036b6348d9
5 changed files with 14 additions and 20 deletions

View File

@@ -20,10 +20,7 @@
#![cfg_attr(test, allow(unused_imports))]
#![no_std]
#[macro_use]
extern crate cfg_if;
cfg_if! {
cfg_if::cfg_if! {
if #[cfg(any(feature = "std_detect_file_io", feature = "std_detect_env_override"))] {
#[cfg_attr(test, macro_use(println))]
extern crate std;