diff --git a/src/response.rs b/src/response.rs index 8d32570a5..277890e40 100644 --- a/src/response.rs +++ b/src/response.rs @@ -212,7 +212,7 @@ impl Response { } /// Set a body - pub(crate) fn set_body(self, body: B2) -> Response { + pub(crate) fn set_body(self, body: B2) -> Response { Response { head: self.head, body: ResponseBody::Body(body), @@ -230,10 +230,7 @@ impl Response { } /// Set a body and return previous body value - pub(crate) fn replace_body( - self, - body: B2, - ) -> (Response, ResponseBody) { + pub(crate) fn replace_body(self, body: B2) -> (Response, ResponseBody) { ( Response { head: self.head, @@ -245,7 +242,7 @@ impl Response { } /// Set a body and return previous body value - pub fn map_body(mut self, f: F) -> Response + pub fn map_body(mut self, f: F) -> Response where F: FnOnce(&mut ResponseHead, ResponseBody) -> ResponseBody, { @@ -597,7 +594,7 @@ impl ResponseBuilder { /// Set a body and generate `Response`. /// /// `ResponseBuilder` can not be used after this call. - pub fn message_body(&mut self, body: B) -> Response { + pub fn message_body(&mut self, body: B) -> Response { if let Some(e) = self.err.take() { return Response::from(Error::from(e)).into_body(); }