1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-18 15:41:17 +00:00

added response's helper method finish

This commit is contained in:
Nikolay Kim 2017-10-23 23:52:20 -07:00
parent b9c11b56f8
commit ccb3f61d70

View file

@ -372,6 +372,11 @@ impl HttpResponseBuilder {
error: None,
})
}
/// Set an empty body
pub fn finish(&mut self) -> Result<HttpResponse, HttpError> {
self.body(Body::Empty)
}
}
fn parts<'a>(parts: &'a mut Option<Parts>, err: &Option<HttpError>) -> Option<&'a mut Parts>