Files
rustlings/exercises/22_clippy/clippy2.rs
T

12 lines
176 B
Rust
Raw Normal View History

2026-03-12 20:54:14 -04:00
fn main() {
let mut res = 42;
let option = Some(12);
2026-03-23 03:36:33 -04:00
2026-03-12 20:54:14 -04:00
// TODO: Fix the Clippy lint.
2026-03-23 03:36:33 -04:00
if let Some(x) = option {
2026-03-12 20:54:14 -04:00
res += x;
}
println!("{res}");
}