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
The Rust tutorial mentions that you can use let for destructuring patterns, but only in passing.
In particular, the sections that cover struct and tuples (and struct tuples) almost always use match rather than let to destructure their inputs, despite the fact that the patterns in these cases are irrefutable patterns.
I can understand wanting to minimize the number of concepts that are introduced, but let destructuring is so much more lightweight than match, we should try to point it out (a second time) in the struct/tuples section, perhaps immediately after the first instance of a use of match to destructure a struct.