Skip to content

Commit

Permalink
Simplify types in std::option doc comment example.
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed May 4, 2017
1 parent b16c7a2 commit 7b94d6c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/libcore/option.rs
Expand Up @@ -66,14 +66,14 @@
//! not ([`None`]).
//!
//! ```
//! let optional: Option<Box<i32>> = None;
//! check_optional(&optional);
//! let optional = None;
//! check_optional(optional);
//!
//! let optional: Option<Box<i32>> = Some(Box::new(9000));
//! check_optional(&optional);
//! let optional = Some(Box::new(9000));
//! check_optional(optional);
//!
//! fn check_optional(optional: &Option<Box<i32>>) {
//! match *optional {
//! fn check_optional(optional: Option<Box<i32>>) {
//! match optional {
//! Some(ref p) => println!("has value {}", p),
//! None => println!("has no value"),
//! }
Expand Down

0 comments on commit 7b94d6c

Please sign in to comment.