复杂一些的条件推断,使用if 语句就有些力不从心了。 match 能够这样:. let x = 5;; match x {; 1 => println!("one"),; 2 => println!("two"),
確定! 回上一頁