diff options
| author | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2017-01-30 08:39:03 +0200 |
|---|---|---|
| committer | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2017-01-30 08:39:03 +0200 |
| commit | 4814fa488e44e641ff788dda9a07bbcc33a59560 (patch) | |
| tree | 581ceacbd8792a6de0fee985fe790c8a9456810d /src/libcore/option.rs | |
| parent | 45b273af4a48e9625749286049326abe4fce064c (diff) | |
| download | rust-4814fa488e44e641ff788dda9a07bbcc33a59560.tar.gz rust-4814fa488e44e641ff788dda9a07bbcc33a59560.zip | |
doc: minor Option improvements
Diffstat (limited to 'src/libcore/option.rs')
| -rw-r--r-- | src/libcore/option.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 8871e1fa840..c4d7b2dcf96 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -60,7 +60,7 @@ //! the optional owned box, [`Option`]`<`[`Box<T>`]`>`. //! //! The following example uses [`Option`] to create an optional box of -//! [`i32`]. Notice that in order to use the inner [`i32`] value first the +//! [`i32`]. Notice that in order to use the inner [`i32`] value first, the //! `check_optional` function needs to use pattern matching to //! determine whether the box has a value (i.e. it is [`Some(...)`][`Some`]) or //! not ([`None`]). @@ -74,8 +74,8 @@ //! //! fn check_optional(optional: &Option<Box<i32>>) { //! match *optional { -//! Some(ref p) => println!("have value {}", p), -//! None => println!("have no value"), +//! Some(ref p) => println!("has value {}", p), +//! None => println!("has no value"), //! } //! } //! ``` |
