-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
| /// Convert the dimension into a pattern matching friendly value. |
Sorry for starting with a comment on the "least important".
Once upon a time, Rust could do patterns with tuples but not with arrays:
let (x, y) = obj1; // OK
let [x, y] = obj2; // used to be invalid syntax.
But this is no longer the case. Both (x, y) and [x, y] are valid patterns since "some" time (for pairs and arrays-of-2 respectively). So this was the origin of "pattern matching friendly" for tuples here.
With that said, patterned/as_pattern probably still plays a role when we grow the number of ways to specify layout, for example when const length axes are in play?
Metadata
Metadata
Assignees
Labels
No labels