summaryrefslogblamecommitdiff
path: root/rust-book/enums/src/main.rs
blob: b8c61de98237d8685da78b1863ef9926b6881068 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                       
fn main() {
    let some_u8_value = Some(3u8);
//    match some_u8_value {
//        Some(3) => println!("three"),
//        _ => (),
//    }

    if let Some(3) = some_u8_value {
        println!("three");
    }

}