Closed
Description
From the first example in 14.5:
match cmp(num, secret_number) {
Less => println!("Too small!"),
Greater => println!("Too big!"),
Equal => { println!("You win!"); },
}
All three branches of the match should use the same syntax (with braces and semicolon, or without).
This likely occurs because the subsequent example adds a "return;" to the Equal case.
Metadata
Metadata
Assignees
Labels
No labels