Rust arrays and tuples

Arrays

Arrays

arrays: like tuples but must be same type let a:[i32,3] = [1,2,3] [3;5] == [3,3,3,3,3] a[0] = 1

Tuples

Tuples

tuples

let tup: (i32, f64, u8) = (500, 6.4, 1)

let (x, y, z) = tup tup.0