Remove unneeded ref from docs

Will reduce confusion like in https://users.rust-lang.org/t/help-understanding-the-ref-t-syntax/33779 since match ergonomics means you (almost) never have to say `ref` anymore!
This commit is contained in:
Carol (Nichols || Goulding) 2019-10-19 11:20:05 -04:00 committed by GitHub
parent e5b8c118a3
commit 4ea1a1983e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@
//!
//! fn check_optional(optional: Option<Box<i32>>) {
//! match optional {
//! Some(ref p) => println!("has value {}", p),
//! Some(p) => println!("has value {}", p),
//! None => println!("has no value"),
//! }
//! }
@ -83,7 +83,7 @@
//! let msg = Some("howdy");
//!
//! // Take a reference to the contained string
//! if let Some(ref m) = msg {
//! if let Some(m) = &msg {
//! println!("{}", *m);
//! }
//!