1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 22:49:21 +02:00

make ServiceRequest::from_parts private, as it is not safe to create from parts

This commit is contained in:
Nikolay Kim
2019-04-18 16:03:13 -07:00
parent 75e340137d
commit aa255298ef
3 changed files with 19 additions and 17 deletions

View File

@ -53,7 +53,7 @@ pub struct ServiceRequest {
impl ServiceRequest {
/// Construct service request from parts
pub fn from_parts(req: HttpRequest, payload: Payload) -> Self {
pub(crate) fn from_parts(req: HttpRequest, payload: Payload) -> Self {
ServiceRequest { req, payload }
}