tide::Response::set_content_type usage
Open
- Dominant language
- Rust
- Stars
- 5.1k
- Forks
- 329
- PR merge metrics
- No merged PRs in 30d
Description
This function takes `impl Into` as an input which is not so great from usability stand-point.
Because `Mime` doesn't implement `From` for anything but itself.
On the other hand `Mime` implements `FromStr` which allows using it like this. `"text/html".parse()`.
But it context of `set_content_type` call rustc cannot infer what type to parse to. It could if `set_content_type` would accept `Mime` type directly.
Contributor guide
Assessment
This issue has not been assessed yet.