fn main() {
let x = 5;
match x {
1..=5 => println!("one through five"),
_ => println!("something else"),
}
}
fn main() {
let x = 5;
match x {
1...5 => println!("one through five"),
_ => println!("something else"),
}
}
When I saw the official tutorial, some people wrote ... and others wrote .. = . What is the difference between them? I am confused? Current observations have found that there are warnings when using ... , so when should you use ... ? Pattern Syntax - The Rust Programming Language
Pattern Syntax - The Rust Programming Language