Getting Started Flashcards

1
Q

What is the command line tool used to install Rust?

A

rustup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the command to update rustup?

A

rustup update

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Check the current installed version of Rust.

A

rustc –version

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Open the offline rust documentation from the command line.

A

rustup doc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the command to automatically format Rust code?

A

rustfmt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The ‘main’ function is special. Why?

A

It is always the first code that runs in every executable Rust program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Automatically fix rust compiler errors.

A

rustfix using cargo fix

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly