1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 17:07:01 +02:00

fix drain support for actor; make pattern more reusable

This commit is contained in:
Nikolay Kim
2018-01-02 23:43:17 -08:00
parent 9e6d090fd0
commit 70ea43b3c0
6 changed files with 82 additions and 30 deletions

View File

@@ -93,6 +93,12 @@ impl From<StaticResponse> for HttpResponse {
}
}
impl From<StaticResponse> for Reply {
fn from(st: StaticResponse) -> Self {
HttpResponse::new(st.0, Body::Empty).into()
}
}
macro_rules! STATIC_RESP {
($name:ident, $status:expr) => {
#[allow(non_snake_case)]