You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I'd suggest the most idiomatic way of solving this would be to remove the u8 suffix completely and rely on inference. It generally wouldn't occur to me when writing this code to include a suffix.
I'm not sure we need to take any action here, and this may just be a question of personal style, but it came up while I was watching a novice programmer take the course, so I figured I'd raise it for discussion. We may want to add a comment about the two options, or slightly change the exercise to guide in one direction or the other.
The text was updated successfully, but these errors were encountered:
The most obvious way to solve https://github.com/mainmatter/100-exercises-to-learn-rust/blob/main/exercises/02_basic_calculator/01_integers/src/lib.rs is to replace the
u8
suffix with au32
suffix. This is also what's present in the solutions branch, and is valid and correct.But I'd suggest the most idiomatic way of solving this would be to remove the
u8
suffix completely and rely on inference. It generally wouldn't occur to me when writing this code to include a suffix.I'm not sure we need to take any action here, and this may just be a question of personal style, but it came up while I was watching a novice programmer take the course, so I figured I'd raise it for discussion. We may want to add a comment about the two options, or slightly change the exercise to guide in one direction or the other.
The text was updated successfully, but these errors were encountered: