Skip to content

Commit 9040948

Browse files
committed
Adds comma
Oddly (to me), this code runs fine without the comma separating the `Some` and `None` arms of the `match` construct. It seems like Rust doesn't require you to separate arms with commas if all the expressions are enclosed in braces.
1 parent 083b46d commit 9040948

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4209,7 +4209,7 @@ loop {
42094209
match range.next() {
42104210
Some(x) => {
42114211
println!("{}", x);
4212-
}
4212+
},
42134213
None => { break }
42144214
}
42154215
}

0 commit comments

Comments
 (0)