mirror of
https://github.com/rust-unofficial/patterns
synced 2024-11-04 18:00:27 +00:00
Fix language.
This commit is contained in:
parent
618a65c337
commit
9fd6a8f9cf
@ -53,7 +53,7 @@ result, we get the original `name` *as an owned value*. We can wrap this in
|
|||||||
an `Option` or another enum that we can destructure in the next step to put the
|
an `Option` or another enum that we can destructure in the next step to put the
|
||||||
contained values into our mutably borrowed enum.
|
contained values into our mutably borrowed enum.
|
||||||
|
|
||||||
Note, however, that we you are using an `Option` and are replacing its
|
Note, however, that if we are using an `Option` and want to replace its
|
||||||
value with a `None`, `Option`’s `take()` method provides a shorter and
|
value with a `None`, `Option`’s `take()` method provides a shorter and
|
||||||
more idiomatic alternative.
|
more idiomatic alternative.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user