Getting Started Flashcards
1
Q
What is the command line tool used to install Rust?
A
rustup
2
Q
What is the command to update rustup?
A
rustup update
3
Q
Check the current installed version of Rust.
A
rustc –version
4
Q
Open the offline rust documentation from the command line.
A
rustup doc
5
Q
What is the command to automatically format Rust code?
A
rustfmt
6
Q
The ‘main’ function is special. Why?
A
It is always the first code that runs in every executable Rust program.
7
Q
Automatically fix rust compiler errors.
A
rustfix using cargo fix
8
Q
The Clippy tool is a collection of lints to analyze your code so you can catch common mistakes and improve your Rust code.
How do you install Clippy?
A
rustup component add clippy
then enter: cargo clippy