rustlings/exercises/22_clippy/clippy2.rs

11 lines
175 B
Rust
Raw Permalink Normal View History

2024-10-28 20:46:17 +00:00
fn main() {
let mut res = 42;
let option = Some(12);
// TODO: Fix the Clippy lint.
2024-11-09 11:43:57 +00:00
if let Some(x) = option {
2024-10-28 20:46:17 +00:00
res += x;
}
println!("{res}");
}