Skip to content

Change trait bounds of NoneAsEmptyString? #388

@jonasbb

Description

@jonasbb

The serialize implementation relies on AsRef<str>. Maybe it is better to use the Display bound instead. This might make it more useable with non-String types, e.g., Option<i32>.

Here is a reference where it is used to parse get query parameter, which can be the empty string when not set:
tokio-rs/axum#443

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changesThese changes require a major version number increase

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions