fix changelog

This commit is contained in:
Rob Ede 2021-01-09 11:48:02 +00:00
parent 434d8a4a2f
commit f8f2204431
No known key found for this signature in database
GPG Key ID: C2A3B36E841A91E6
4 changed files with 8 additions and 9 deletions

View File

@ -15,7 +15,7 @@
* Public field of `web::Query` has been made private. [#1894] * Public field of `web::Query` has been made private. [#1894]
[#1891]: https://github.com/actix/actix-web/pull/1891 [#1891]: https://github.com/actix/actix-web/pull/1891
[#????]: https://github.com/actix/actix-web/pull/???? [#1894]: https://github.com/actix/actix-web/pull/1894
## 4.0.0-beta.1 - 2021-01-07 ## 4.0.0-beta.1 - 2021-01-07
### Added ### Added

View File

@ -110,7 +110,7 @@ impl<T: Responder> Responder for (T, StatusCode) {
impl Responder for &'static str { impl Responder for &'static str {
fn respond_to(self, _: &HttpRequest) -> HttpResponse { fn respond_to(self, _: &HttpRequest) -> HttpResponse {
HttpResponse::Ok() HttpResponse::Ok()
.content_type("text/plain; charset=utf-8") .content_type(mime::TEXT_PLAIN_UTF_8)
.body(self) .body(self)
} }
} }
@ -118,7 +118,7 @@ impl Responder for &'static str {
impl Responder for &'static [u8] { impl Responder for &'static [u8] {
fn respond_to(self, _: &HttpRequest) -> HttpResponse { fn respond_to(self, _: &HttpRequest) -> HttpResponse {
HttpResponse::Ok() HttpResponse::Ok()
.content_type("application/octet-stream") .content_type(mime::APPLICATION_OCTET_STREAM)
.body(self) .body(self)
} }
} }
@ -126,7 +126,7 @@ impl Responder for &'static [u8] {
impl Responder for String { impl Responder for String {
fn respond_to(self, _: &HttpRequest) -> HttpResponse { fn respond_to(self, _: &HttpRequest) -> HttpResponse {
HttpResponse::Ok() HttpResponse::Ok()
.content_type("text/plain; charset=utf-8") .content_type(mime::TEXT_PLAIN_UTF_8)
.body(self) .body(self)
} }
} }
@ -134,7 +134,7 @@ impl Responder for String {
impl<'a> Responder for &'a String { impl<'a> Responder for &'a String {
fn respond_to(self, _: &HttpRequest) -> HttpResponse { fn respond_to(self, _: &HttpRequest) -> HttpResponse {
HttpResponse::Ok() HttpResponse::Ok()
.content_type("text/plain; charset=utf-8") .content_type(mime::TEXT_PLAIN_UTF_8)
.body(self) .body(self)
} }
} }
@ -142,7 +142,7 @@ impl<'a> Responder for &'a String {
impl Responder for Bytes { impl Responder for Bytes {
fn respond_to(self, _: &HttpRequest) -> HttpResponse { fn respond_to(self, _: &HttpRequest) -> HttpResponse {
HttpResponse::Ok() HttpResponse::Ok()
.content_type("application/octet-stream") .content_type(mime::APPLICATION_OCTET_STREAM)
.body(self) .body(self)
} }
} }
@ -150,7 +150,7 @@ impl Responder for Bytes {
impl Responder for BytesMut { impl Responder for BytesMut {
fn respond_to(self, _: &HttpRequest) -> HttpResponse { fn respond_to(self, _: &HttpRequest) -> HttpResponse {
HttpResponse::Ok() HttpResponse::Ok()
.content_type("application/octet-stream") .content_type(mime::APPLICATION_OCTET_STREAM)
.body(self) .body(self)
} }
} }

View File

@ -1,5 +1,4 @@
//! For either helper, see [`Either`]. //! For either helper, see [`Either`].
// TODO: could we just use either::Either?
use bytes::Bytes; use bytes::Bytes;
use futures_util::{future::LocalBoxFuture, FutureExt, TryFutureExt}; use futures_util::{future::LocalBoxFuture, FutureExt, TryFutureExt};

View File

@ -1,4 +1,4 @@
//! For form-urlencoded helper documentation, see [`Form`]. //! For URL encoded form helper documentation, see [`Form`].
use std::{ use std::{
fmt, fmt,