Guest User

Untitled

a guest
Jul 20th, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. struct Guard(i32);
  2.  
  3. fn main() {
  4. let guard = Guard(5);
  5. let result = match guard.0 {
  6. x if x == 0 => "equal",
  7. x if x < 0 => "less",
  8. x if x > 0 => "greater",
  9. _ => "unreachable"
  10. };
  11.  
  12. println!("{}", result);
  13.  
  14. }
Add Comment
Please, Sign In to add comment