废话少说,直接贴代码看例子吧!
fn main() {
let s = String::from("hello");match &s as &str {
"hello" => println!("hello"),_ => (),}
}
废话少说,直接贴代码看例子吧!
fn main() {
let s = String::from("hello");match &s as &str {
"hello" => println!("hello"),_ => (),}
}