From Ex 52 about slices, the comments state that "// The type of a slice on an array of u8 items is []u8."
But, in order to store slices of length 4 i had to declare the variables as:
"const hand1: *[4]u8 = cards[0..4];" since the slice is of type *[4]u8, and define the function parameters to be the same. So is the comment incorrect or was it expecting a different solution?
Also, a question about errors: one of the early exercises wanted me to use a 'try' statement without much elaboration, and multiple errors were possible. I tried various ways to do if-statements to report based on the type of error encountered, but kept running into type issues with the conditionals. So, if using the shorthand try, is it possible to handle each error case differently or do i have to use the 'catch' syntax for that?
Thanks in advance