compound types

This commit is contained in:
Vincent Batts 2023-01-14 13:57:39 -05:00
commit aaa0c9143e
31 changed files with 38 additions and 0 deletions

10
src/main.rs Normal file
View file

@ -0,0 +1,10 @@
fn main() {
let mut a: [i8; 10] = [42; 10];
a[5] = 0;
println!("a: {:?}", a);
// so this is assigning an immutable tuple
let t: (i8, bool) = (7, true);
println!("t 1st: {}", t.0);
println!("t 2nd: {}", t.1);
}