1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 23:51:06 +01: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>