Another thing that helped me was to start with something other than a complete beginner’s tutorial.
The Rust for C Programmers book is a great resource for someone with existing C experience; it explains the core Rust concepts concisely and in a way that makes it easy to lookup things as needed.
The other resource that was very helpful was the Blessed.rs curated list of common crates.
3/
@toke taking several "bounces" before one starts getting it does seem to be a common thing with Rust
@toke Have you used clippy? Clippy is fantastic at showing you better ways of doing what you're already doing. It's like having an experienced rust developer review your code for you and point out useful tricks.
@toke Coming from C, I foolishly expected that `u8`s would wrap around when doing `u8::MIN-1`, or... go back to 0 when doing `u8::MAX+1`.
But of course not, all this is learned undefined behaviour, and things like
```myu8 = max(myu8-1, 0);```
to do some clamping don't even compile.
Instead, there are defined methods to do this explicitly instead, such as saturating operations, e.g. https://doc.rust-lang.org/stable/std/primitive.u8.html#method.saturating_sub,
```myu8 = myu8.saturating_sub(1);```
(Look, ma, no `max`!)