From 7b94d6cf19d1a9af23483d366217b010ed66b78d Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Thu, 4 May 2017 11:53:24 -0400 Subject: [PATCH] Simplify types in `std::option` doc comment example. --- src/libcore/option.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 1a48f277625..515f49d6f0b 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -66,14 +66,14 @@ //! not ([`None`]). //! //! ``` -//! let optional: Option> = None; -//! check_optional(&optional); +//! let optional = None; +//! check_optional(optional); //! -//! let optional: Option> = Some(Box::new(9000)); -//! check_optional(&optional); +//! let optional = Some(Box::new(9000)); +//! check_optional(optional); //! -//! fn check_optional(optional: &Option>) { -//! match *optional { +//! fn check_optional(optional: Option>) { +//! match optional { //! Some(ref p) => println!("has value {}", p), //! None => println!("has no value"), //! } -- 2.44.0