Skip to content

Commit 5c5cca5

Browse files
committed
Small syntax and formatting changes
1 parent 01b9cc5 commit 5c5cca5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/trpl/guessing-game.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ With this definition, anything of type `Foo` can be either a
599599
`Foo::Bar` or a `Foo::Baz`. We use the `::` to indicate the
600600
namespace for a particular `enum` variant.
601601

602-
The [`Ordering`][ordering] enum has three possible variants: `Less`, `Equal`,
602+
The [`Ordering`][ordering] `enum` has three possible variants: `Less`, `Equal`,
603603
and `Greater`. The `match` statement takes a value of a type, and lets you
604604
create an ‘arm’ for each possible value. Since we have three types of
605605
`Ordering`, we have three arms:
@@ -918,9 +918,9 @@ let guess: u32 = match guess.trim().parse() {
918918
919919
This is how you generally move from ‘crash on error’ to ‘actually handle the
920920
error’, by switching from `ok().expect()` to a `match` statement. The `Result`
921-
returned by `parse()` is an enum just like `Ordering`, but in this case, each
921+
returned by `parse()` is an `enum` just like `Ordering`, but in this case, each
922922
variant has some data associated with it: `Ok` is a success, and `Err` is a
923-
failure. Each contains more information: the successful parsed integer, or an
923+
failure. Each contains more information: the successfully parsed integer, or an
924924
error type. In this case, we `match` on `Ok(num)`, which sets the inner value
925925
of the `Ok` to the name `num`, and then we just return it on the right-hand
926926
side. In the `Err` case, we don’t care what kind of error it is, so we just

0 commit comments

Comments
 (0)