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
I 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 the TryFrom
I can come with a PR.
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
TryFromimplementation 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 theTryFromI can come with a PR.