LYR-PAR0035
match arms without ',' between them
A match arm whose body is an expression is followed by another arm without a ,.
Explanation
An arm with an expression body ends with ,, unless it is the last; an arm with a block body ends with its } and may leave the comma off.
Write , after the arm.
Wrong
fn main(): void {
let n = 1;
let s = match (n) {
1 => "one"
_ => "many",
};
}
Right
fn main(): void {
let n = 1;
let s = match (n) {
1 => "one",
_ => "many",
};
let _ = s;
}