mirror of
https://github.com/vlang/v.git
synced 2025-09-08 23:07:19 -04:00
doc: document comma in match
This commit is contained in:
parent
2b545f6b90
commit
d88e8bb9ea
@ -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 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user