You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the patterns part of the guide, all the examples do matches forward. There should be examples with a different order to show the order isn't important:
structPoint{x:int,y:int,z:int,w:int}let origin = Point{x:0,y:0,z:0,w:0};// All examples do thismatch origin {Point{ x, .. } => println!("x is {}", x),}// If you only want the last value...this doesn't workmatch origin {Point{ ..,w } => println!("w is {}", w),}// Indicate that the order is irrelevantmatch origin {Point{ w, y, z, x } => println!("y is {}, w is {}", y, w),}// Then you can do thismatch origin {Point{ w, .. } => println!("w is {}", w),}
In the patterns part of the guide, all the examples do matches forward. There should be examples with a different order to show the order isn't important:
cc @steveklabnik
The text was updated successfully, but these errors were encountered: