Listings 18-15 and 18-16 have inconsistent use of commas after brace-delimited match arms.
In 18-15, the first arm is a block and ends with a comma. The second and fourth arms are also blocks, and end without commas.
Similarly in listing 18-16 the first and second match arms are brace-delimited, but only the first ends with a comma.
I've checked and rustfmt does strip these commas.
As a Rust learner, there are two things I'd point out here:
- the inconsistency is confusing for learners, who will wonder what the rules are for commas here
- shouldn't all listings go through rustfmt?
Anyway I'm just a learner but was encouraged to mention this here.
Listings 18-15 and 18-16 have inconsistent use of commas after brace-delimited match arms.
In 18-15, the first arm is a block and ends with a comma. The second and fourth arms are also blocks, and end without commas.
Similarly in listing 18-16 the first and second match arms are brace-delimited, but only the first ends with a comma.
I've checked and rustfmt does strip these commas.
As a Rust learner, there are two things I'd point out here:
Anyway I'm just a learner but was encouraged to mention this here.