Next Steps
What you can do now
- Install Rust with rustup and use Cargo
- Explain ownership, moves, and borrowing
- Use structs, enums, Option, Result, and Vec
- Organize modules, add a crate, and run tests
Practice ideas
Build a command-line to-do list that stores items in a file using Result and ?. Cover parsing with unit tests.
Common traps
- Fighting the borrow checker instead of restructuring data
- Overusing
unwrap - Indexing strings by bytes unsafely
- Growing
maininstead of modules and functions
Where to go next
- Lifetimes in more depth
- Iterators and closures
- Async Rust with
tokio - Error crates like
thiserrorandanyhow - Clippy lints and rustfmt for style
Comments
One comment per signed-in account. Comments are saved with this page’s URL.