File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 60
60
//! the optional owned box, [`Option`]`<`[`Box<T>`]`>`.
61
61
//!
62
62
//! The following example uses [`Option`] to create an optional box of
63
- //! [`i32`]. Notice that in order to use the inner [`i32`] value first the
63
+ //! [`i32`]. Notice that in order to use the inner [`i32`] value first, the
64
64
//! `check_optional` function needs to use pattern matching to
65
65
//! determine whether the box has a value (i.e. it is [`Some(...)`][`Some`]) or
66
66
//! not ([`None`]).
74
74
//!
75
75
//! fn check_optional(optional: &Option<Box<i32>>) {
76
76
//! match *optional {
77
- //! Some(ref p) => println!("have value {}", p),
78
- //! None => println!("have no value"),
77
+ //! Some(ref p) => println!("has value {}", p),
78
+ //! None => println!("has no value"),
79
79
//! }
80
80
//! }
81
81
//! ```
You can’t perform that action at this time.
0 commit comments