2 ms·
Yep, you could change the asserted length and it would succeed: assert_eq!(array, [0, 1, 2]); If you tried both— assert_eq!(array, [0, 1, 2]); assert_e
by aendruk 4y ago
Yep, you could change the asserted length and it would succeed:
assert_eq!(array, [0, 1, 2]);
If you tried both—
assert_eq!(array, [0, 1, 2]);
assert_eq!(array, [0, 1, 2, 3, 4]);
—the assertions would never run because it wouldn’t even compile:
error[E0277]: can't compare `[usize; 3]` with `[{integer}; 5]`