feat(mime): upgrade to mime v0.3
The new mime crate has several benefits: - Faster formatting - Easier to use. Most common mime types are now just constants, like `mime::TEXT_PLAIN`. - Proper suffix support. - Extensible without breaking backwards compatiblity. This means we can always add new constants, but before we couldn't add new variants to the enums. - It's now impossible for a `Mime` to contain invalid tokens. Before, with the `Ext(String)` variants, it was possible to create an illegal mime. Closes #738 BREAKING CHANGE: Most uses of `mime` will likely break. There is no more `mime!` macro, nor a `Mime` constructor, nor `TopLevel` and `SubLevel` enums. Instead, in most cases, a constant exists that can now be used. For less common mime types, they can be created by parsing a string.
This commit is contained in:
		| @@ -20,7 +20,7 @@ extern crate futures_cpupool; | ||||
| extern crate httparse; | ||||
| extern crate language_tags; | ||||
| #[macro_use] extern crate log; | ||||
| #[macro_use] pub extern crate mime; | ||||
| pub extern crate mime; | ||||
| extern crate base64; | ||||
| extern crate time; | ||||
| extern crate tokio_core as tokio; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user