Update the existing `html` method.

This commit is contained in:
LukeMathWalker 2021-10-26 08:56:45 +01:00
parent e591881b4c
commit 630e0b1b8e
2 changed files with 3 additions and 9 deletions

View File

@ -1,8 +1,8 @@
# Changes
## Unreleased - 2021-xx-xx
### Added
* `ContentType::html_utf8`, a constructor to easily create a `Content-Type: text/html; charset=utf-8` header;
### Changed
* `ContentType::html` now returns `Content-Type: text/html; charset=utf-8` instead of `Content-Type: text/html`.
## 4.0.0-beta.10 - 2021-10-20

View File

@ -74,16 +74,10 @@ impl ContentType {
ContentType(mime::TEXT_PLAIN_UTF_8)
}
/// A constructor to easily create a `Content-Type: text/html` header.
#[inline]
pub fn html() -> ContentType {
ContentType(mime::TEXT_HTML)
}
/// A constructor to easily create a `Content-Type: text/html; charset=utf-8`
/// header.
#[inline]
pub fn html_utf8() -> ContentType {
pub fn html() -> ContentType {
ContentType(mime::TEXT_HTML_UTF_8)
}