- ensure `cargo check` passes after completing every step
- run `cargo test`, `cargo clippy` and `cargo fmt` before committing anything, and explain any test failures (if expected)
youtu.be/XldKv1vuH0g
youtu.be/XldKv1vuH0g
- conditionally declare a variable
- return early
- avoid indenting the remaining checks (as in the other examples)
I prefer returning early and using the implicit return for the "happy path". What do you think?
- conditionally declare a variable
- return early
- avoid indenting the remaining checks (as in the other examples)
I prefer returning early and using the implicit return for the "happy path". What do you think?
The precise type system makes it easy to communicate about code at a functional level, and powerful tooling make it trivial to spot and understand the inevitable errors BEFORE executing anything.
#rustlang
The precise type system makes it easy to communicate about code at a functional level, and powerful tooling make it trivial to spot and understand the inevitable errors BEFORE executing anything.
#rustlang