From 34c9cedaea9961b491baed2eb05e53b0cfe77fc5 Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Sat, 3 Feb 2018 13:56:32 +0100 Subject: [PATCH] Enable `info!` for `no_std` --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index c1fdf53f654..a97a5415139 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -257,7 +257,7 @@ #[cfg(feature = "log")] #[macro_use] extern crate log; #[cfg(not(feature = "log"))] macro_rules! trace { ($($x:tt)*) => () } #[cfg(not(feature = "log"))] macro_rules! debug { ($($x:tt)*) => () } -#[cfg(all(feature="std", not(feature = "log")))] macro_rules! info { ($($x:tt)*) => () } +#[cfg(not(feature = "log"))] macro_rules! info { ($($x:tt)*) => () } #[cfg(all(feature="std", not(feature = "log")))] macro_rules! warn { ($($x:tt)*) => () } #[cfg(all(feature="std", not(feature = "log")))] macro_rules! error { ($($x:tt)*) => () } @@ -1250,7 +1250,7 @@ mod test { 80, 81, 82, 83, 84, 85, 86, 87]; for &n in lengths.iter() { let mut buffer = [0u8; 87]; - let mut v = &mut buffer[0..n]; + let v = &mut buffer[0..n]; r.fill_bytes(v); // use this to get nicer error messages.