Fix verbose explanation

This commit is contained in:
Elahn Ientile 2016-08-20 15:50:21 +10:00
parent e2df7322cd
commit e4543286a0

View File

@ -637,11 +637,10 @@ match guess.cmp(&secret_number) {
The `cmp()` method compares two values, and can be called on anything that can The `cmp()` method compares two values, and can be called on anything that can
be compared. It takes a reference to the thing you want to compare it to, so be compared. It takes a reference to the thing you want to compare it to, so
here it's comparing our `guess` to our `secret_number`. `cmp()` returns a here it's comparing our `guess` to our `secret_number` and returning a variant
variant of the `Ordering` type we imported with the `use` statement earlier. We of the `Ordering` enum. We use a [`match`][match] statement to decide what to
use a [`match`][match] statement to decide what to do next based on which do next based on which variant of `Ordering` we got back from our call to
variant of `Ordering` we got back from our call to `cmp()` with the values in `cmp()` with the values in `guess` and `secret_number`.
`guess` and `secret_number`.
[match]: match.html [match]: match.html