summaryrefslogtreecommitdiff
path: root/exercises/clippy/clippy2.rs
blob: dac40dbef68bc1cd8bc0ce70e8edbef7fcf44b87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// clippy2.rs
// Execute `rustlings hint clippy2` or use the `hint` watch subcommand for a hint.

// I AM NOT DONE

fn main() {
    let mut res = 42;
    let option = Some(12);
    for x in option {
        res += x;
    }
    println!("{}", res);
}