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
Unless you need to pass the nested Foo or Bar in its entirety, I found it a bit more elegant to expand the enum variants to contain anonymous struct, then do destructuring when matching, binding what I need then and passing it forward.
Enum of named structs is one of usual patterns:
Are there any ways to reduce the amount of boilerplate if it's ever needed? I've thought of something like this:
I'm not sure if it's appropriate to denote it this way using InferredType.
The text was updated successfully, but these errors were encountered: