Match
https://doc.rust-lang.org/book/match.html
matchした結果を変数に代入できるのが良い。
let number = match x { 1 => "one", 2 => "two", 3 => "three", 4 => "four", 5 => "five", _ => "something else", };
https://doc.rust-lang.org/book/match.html
matchした結果を変数に代入できるのが良い。
let number = match x { 1 => "one", 2 => "two", 3 => "three", 4 => "four", 5 => "five", _ => "something else", };