This commit is contained in:
Rob Ede 2021-04-19 02:16:54 +01:00
parent 40d3d96246
commit 567fc475a8
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
4 changed files with 7 additions and 7 deletions

View File

@ -4,6 +4,7 @@
### Added ### Added
* Re-export `http` crate's `Error` type as `error::HttpError`. [#2171] * Re-export `http` crate's `Error` type as `error::HttpError`. [#2171]
* Re-export `StatusCode`, `Method`, `Version` and `Uri` at the crate root. [#2171] * Re-export `StatusCode`, `Method`, `Version` and `Uri` at the crate root. [#2171]
* Re-export `ContentEncoding` and `ConnectionType` at the crate root. [#2171]
### Changed ### Changed
* `header` mod is now public. [#2171] * `header` mod is now public. [#2171]

View File

@ -56,21 +56,20 @@ pub use self::builder::HttpServiceBuilder;
pub use self::config::{KeepAlive, ServiceConfig}; pub use self::config::{KeepAlive, ServiceConfig};
pub use self::error::{Error, ResponseError, Result}; pub use self::error::{Error, ResponseError, Result};
pub use self::extensions::Extensions; pub use self::extensions::Extensions;
pub use self::header::ContentEncoding;
pub use self::http_message::HttpMessage; pub use self::http_message::HttpMessage;
pub use self::message::ConnectionType;
pub use self::message::{Message, RequestHead, RequestHeadType, ResponseHead}; pub use self::message::{Message, RequestHead, RequestHeadType, ResponseHead};
pub use self::payload::{Payload, PayloadStream}; pub use self::payload::{Payload, PayloadStream};
pub use self::request::Request; pub use self::request::Request;
pub use self::response::Response; pub use self::response::Response;
pub use self::response_builder::ResponseBuilder; pub use self::response_builder::ResponseBuilder;
pub use self::service::HttpService; pub use self::service::HttpService;
pub use self::header::ContentEncoding;
pub use self::message::ConnectionType;
pub use ::http::{StatusCode, Version, Method};
pub use ::http::{uri, uri::Uri}; pub use ::http::{uri, uri::Uri};
pub use ::http::{Method, StatusCode, Version};
// deprecate this mish-mash of random items // TODO: deprecate this mish-mash of random items
#[deprecated = "Everything in this module is available elsewhere."]
pub mod http { pub mod http {
//! Various HTTP related types. //! Various HTTP related types.

View File

@ -289,7 +289,7 @@ impl ResponseBuilder {
return None; return None;
} }
self.head.as_mut().map(|r| &mut **r) self.head.as_deref_mut()
} }
} }

View File

@ -7,7 +7,7 @@ use std::sync::Arc;
use actix_http::HttpService; use actix_http::HttpService;
use actix_http_test::test_server; use actix_http_test::test_server;
use actix_service::{map_config, fn_service, ServiceFactoryExt}; use actix_service::{fn_service, map_config, ServiceFactoryExt};
use actix_utils::future::ok; use actix_utils::future::ok;
use actix_web::http::Version; use actix_web::http::Version;
use actix_web::{dev::AppConfig, web, App, HttpResponse}; use actix_web::{dev::AppConfig, web, App, HttpResponse};