Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Additions
A new, much more composable and Rust-y API has been added to replace the existing mess of free functions. This API also supports returning multiple guesses per extension, supporting the case in #28 where a single file format has multiple possible media types.
rust-phf
has been made an optional feature which is currently disabled whilerust-phf
prepares a 0.8 release; with it disabled the implementation falls back to a binary search.Generating reverse-mappings has been made an optional feature though it is on by default.
mime
has been upgraded to 0.3 and is now publicly exported, andunicase
is upgraded to 2.4.0.Deprecations
Most existing free functions are deprecated. Their deprecation messages include their equivalent expressions with the new API.
New Requirement for Contribution
In an effort to produce a cleaner audit trail, I'm now requiring changes to MIME type mappings to provide citations next to the mappings themselves. This may bloat the crate source a bit more but should not affect compile size or times significantly. Existing mappings can have their citations added over time but this will be a lot of busy work.
Closes #28
Closes #37
Closes #43