Closed jonathanpallant closed 1 year ago
control-flow.html#/8 does not require the commas. It's also overly indented.
fn main() { let a = 4; match a % 3 { 0 => { println!("divisible by 3") }, _ => { println!("not divisible by 3") }, } }
should be
fn main() { let a = 4; match a % 3 { 0 => { println!("divisible by 3") } _ => { println!("not divisible by 3") } } }
or
fn main() { let a = 4; match a % 3 { 0 => println!("divisible by 3"), _ => { println!("not divisible by 3") } } }
to highlight the two kinds of match arms.
control-flow.html#/8 does not require the commas. It's also overly indented.
should be
or
to highlight the two kinds of match arms.