Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaType: Add an AsRef<str> conversion #200

Merged
merged 1 commit into from
Aug 22, 2024

Commits on Aug 22, 2024

  1. MediaType: Add an AsRef<str> conversion

    Currently getting the string representation of a `MediaType`
    requires an allocation into an owned `String`, which is unnecessary.
    
    As a bonus, this deduplicates two copies of mapping the enum to
    a string down into one.
    
    Signed-off-by: Colin Walters <walters@verbum.org>
    cgwalters committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    763c83d View commit details
    Browse the repository at this point in the history