Skip to content

Commit

Permalink
Rollup merge of rust-lang#41749 - frewsxcv:option-simplify-types, r=G…
Browse files Browse the repository at this point in the history
…uillaumeGomez

Simplify types in `std::option` doc comment example.

None
  • Loading branch information
frewsxcv committed May 5, 2017
2 parents 28d17e5 + 7b94d6c commit 2088ca8
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 2088ca8

Please sign in to comment.