9607 shaares
232 private links
232 private links
Most of the time when fighting the compiler it is actually exposing a design flaw. Similarly, if your code gets overly verbose or looks ugly, there’s probably a better way. Declare defeat and learn to do it the Rust way.
Baby steps: avoid to make it too hard on yourself in the beginning.
You can be sloppy in other languages, but not in Rust.
And other useful tips, among them:
Don’t Use Other People’s Crates While Learning: A poor personal version is better than a perfect external crate (at least while learning). Write some small library code yourself as an exercise (except maybe serde and anyhow).