October 2019
Intermediate to advanced
444 pages
10h 37m
English
The steps for this recipe are as follows:
#[test] fn exploring_arrays() { let mut arr: [usize; 3] = [0; 3]; assert_eq!(arr, [0, 0, 0]); let arr2: [usize; 5] = [1,2,3,4,5]; assert_eq!(arr2, [1,2,3,4,5]); arr[0] = 1; assert_eq!(arr, [1, 0, 0]); assert_eq!(arr[0], 1); assert_eq!(mem::size_of_val(&arr), ...Read now
Unlock full access