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
There is a really useful feature currently in the match expression:
match foo {refmut a @ Something(_) => something_else(a),
...}
if you don't know what it does it binds the entire thing matched to a variable, so in the above case something_else will be called with a mutable reference to foo if it meets the pattern Something(_).
The feature seems really useful but it's currently not documented anywhere, I guess someone should document it.
The text was updated successfully, but these errors were encountered:
There is a really useful feature currently in the match expression:
if you don't know what it does it binds the entire thing matched to a variable, so in the above case something_else will be called with a mutable reference to foo if it meets the pattern Something(_).
The feature seems really useful but it's currently not documented anywhere, I guess someone should document it.
The text was updated successfully, but these errors were encountered: