We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
From
Hi all,
I just noticed a crash on my application when calling if let Ok(mime: Mime) = x.try_into() beacuse of the unwrap() in: https://github.com/http-rs/http-types/blob/v2.12.0/src/mime/mod.rs#L131
if let Ok(mime: Mime) = x.try_into()
unwrap()
I think TryFrom implementation would be nice to have as would avoid this kind of errors.
TryFrom
I know I can use the FromStr (that what I'm doing after I discovered the issue), but the I still think it is worth to have the TryFrom
FromStr
I can come with a PR.
The text was updated successfully, but these errors were encountered:
Acutally, let me update this by changing the name. Current From implementation is wrong as it contains and unwrap that can fail.
unwrap
So either it becomes a TryFrom or it can be removed as the FromStr is already there.
Sorry, something went wrong.
No branches or pull requests
Hi all,
I just noticed a crash on my application when calling
if let Ok(mime: Mime) = x.try_into()
beacuse of theunwrap()
in: https://github.com/http-rs/http-types/blob/v2.12.0/src/mime/mod.rs#L131I think
TryFrom
implementation would be nice to have as would avoid this kind of errors.I know I can use the
FromStr
(that what I'm doing after I discovered the issue), but the I still think it is worth to have theTryFrom
I can come with a PR.
The text was updated successfully, but these errors were encountered: