As of 1.66, it is possible to use ..=X in patterns
1
2
3
4
5
6
let result = 20u32;
match result {
0..=20 => println!("Included"),
21.. => println!("Sorry"),
}
As of 1.66, it is possible to use ..=X in patterns
1
2
3
4
5
6
let result = 20u32;
match result {
0..=20 => println!("Included"),
21.. => println!("Sorry"),
}
A new version of content is available.