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

Make mime partial eq to use in pattern match #152

Conversation

bsodmike
Copy link

@bsodmike bsodmike commented Jun 11, 2023

#134 is outdated, and this upgrades it.

This should be used in #137

@bsodmike
Copy link
Author

"if the trait is manually impl'd you can't use consts in matches"

@bsodmike bsodmike closed this Jun 11, 2023
// Any parsed mime has already been lowercased, so if there aren't
// any parameters that are case sensistive, this can skip the
// eq_ascii, and just use a memcmp instead.
(0, _) | (_, 0) => mime_eq_str(self, other.source.as_ref()),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant