Skip to content

EnumString should derive From<&str> instead of TryFrom<&str> when #[strum(default)] is present #307

@MingweiSamuel

Description

@MingweiSamuel

If you derive EnumString on a enum with a #[strum(default)] it generates a TryFrom<&str> implementation which can never return an error. It would make sense to generate From<&str> instead

This would be a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions