doc: document comma in match

pull/6262/head
Alexander Medvednikov 2020-08-29 11:03:16 +02:00 committed by GitHub
parent 2b545f6b90
commit d88e8bb9ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -891,8 +891,7 @@ enum Color {
fn is_red_or_blue(c Color) bool { fn is_red_or_blue(c Color) bool {
return match c { return match c {
.red { true } .red, .blue { true } // comma can be used to test multiple values
.blue { true }
.green { false } .green { false }
} }
} }