Initial commit
This commit is contained in:
10
exercises/22_clippy/clippy2.rs
Normal file
10
exercises/22_clippy/clippy2.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
fn main() {
|
||||
let mut res = 42;
|
||||
let option = Some(12);
|
||||
// TODO: Fix the Clippy lint.
|
||||
if let Some(x) = option {
|
||||
res += x;
|
||||
}
|
||||
|
||||
println!("{res}");
|
||||
}
|
||||
Reference in New Issue
Block a user