Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![crate_type="lib"]
- pub fn test(x: Option<usize>) -> usize {
- match x {
- Some(0) | Some(1) | Some(2) => {
- 0
- },
- Some(_) => {
- 1
- }
- None => {
- 2
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement