mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-23 06:02:23 -05:00
1e2fd9c92f
- adds a new 'clippy' category for exercises - clippy exercises should throw no warnings - install script now also installs clippy is related to https://github.com/rust-lang/rust-clippy/issues/2604
13 lines
233 B
Rust
13 lines
233 B
Rust
// clippy2.rs
|
|
// Make me compile! Execute `rustlings hint clippy2` for hints :)
|
|
|
|
// I AM NOT DONE
|
|
|
|
fn main() {
|
|
let mut res = 42;
|
|
let option = Some(12);
|
|
for x in option {
|
|
res += x;
|
|
}
|
|
println!("{}", res);
|
|
}
|