Skip to content
Snippets Groups Projects
Commit 021545b2 authored by Gustav Hansson's avatar Gustav Hansson
Browse files

bare 3 4

parent 0963b3d0
No related branches found
No related tags found
No related merge requests found
......@@ -29,15 +29,16 @@ fn main() -> ! {
hprint!("{},", c as &u8).unwrap();
}
let mut a = [0u8; 4];
hprintln!("iterate iterate using (raw) indexing").unwrap();
for i in 0usize..s.len() {
hprintln!("{},", bs[i]).unwrap();
a[i] = bs[i];
}
hprintln!("").unwrap();
let a: [u8; 4] = [65u8; 4];
let mut a = [0u8; 4];
hprintln!("").unwrap();
hprintln!("a = {}", core::str::from_utf8(&a).unwrap()).unwrap();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment