[−][src]Function tao_of_rust::ch02::enums::match_ref_2015
pub fn match_ref_2015()
match 匹配引用 (Rust 2015 用法)
Basic usage:
fn match_ref_2015() { let s: &Option<String> = &Some("hello".to_string()); match s { &Some(ref s) => println!("s is: {}", s), _ => (), }; } match_ref_2015();Run