Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

rust match wildcard

let x = 1;

match x {
    1 => println!("one"),
    2 => println!("two"),
    3 => println!("three"),
    4 => println!("four"),
    5 => println!("five"),
    _ => println!("something else"),
}
Source by doc.rust-lang.org #
 
PREVIOUS NEXT
Tagged: #rust #match #wildcard
ADD COMMENT
Topic
Name
4+5 =