-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Some variants can have a common field wrapped in an Option.
So, for example:
enum MyEnum {
A { name: String },
B,
C { name: Option<String> },
}
I expect .name() to work and return an Option<String>. However, we get an error because not all variants have the same type for the name field.
Instead, it would be nice to detect this case and append a .flatten() to the accessor.
Super useful crate. I'm surprised it isn't more popular
Tamschi and vitaliy-grusha
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request