diff --git a/examples/bare3.rs b/examples/bare3.rs index 75063ea18a418175d92c078aee11476eb9420ac8..48c0f5b7bab1908890aae10cca6402d503d33d0e 100644 --- a/examples/bare3.rs +++ b/examples/bare3.rs @@ -18,9 +18,10 @@ use cortex_m_semihosting::{hprint, hprintln}; #[entry] fn main() -> ! { hprintln!("bare3").unwrap(); - let s = "ABCD"; - let bs = s.as_bytes(); - + let s:&str = "ABCD"; + let bs : &[u8] = s.as_bytes(); + let c : u8; + let i : usize; hprintln!("s = {}", s).unwrap(); hprintln!("bs = {:?}", bs).unwrap(); @@ -36,7 +37,7 @@ fn main() -> ! { hprintln!("").unwrap(); - let a = [65u8; 4]; + let a = [0u8; 4]; // let mut a = [0u8; 4]; hprintln!("").unwrap();