Guest User

Untitled

a guest
May 27th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. fn main() {
  2. struct Point {
  3. x: i32,
  4. y: i32,
  5. }
  6.  
  7. let origin = Point { x: 0, y: 0 };
  8.  
  9. match origin {
  10. Point { x: 0, y: 0 } => println!("origin"),
  11. Point { y, .. } => println!("y is {}", y),
  12. }
  13. }
Add Comment
Please, Sign In to add comment