Skip to content
Snippets Groups Projects
Commit e498ad5a authored by anttib-5's avatar anttib-5
Browse files

bare3_4

parent 212ef0d9
No related branches found
No related tags found
No related merge requests found
......@@ -31,16 +31,17 @@ fn main() -> ! {
hprint!("{},", c).unwrap();
}
let a: [u8; 4] = [65u8; 4];
let mut a = [0u8; 4];
hprintln!("iterate iterate using (raw) indexing").unwrap();
for i in 0..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.
Please register or to comment