📜  切换 rust 代码示例

📅  最后修改于: 2022-03-11 14:49:25.349000             🧑  作者: Mango

代码示例1
fn main() {
    for &input in &[16, 23, 42, 43] {
        match input {
            23 => println!("Input is equal to a"),
            16 => println!("Input is equal to b"),
            43 => println!("Input is equal to c"),
            _ => println!("Input does not equal any value"),
        }
    }
}