Reduce number of unwwaps in api crate (#2681)

* Reduce number of unwwaps in api crate

* Format use section
This commit is contained in:
hashmap
2019-03-18 19:34:35 +01:00
committed by GitHub
parent 2b218f2dc3
commit 7fad5b040f
17 changed files with 165 additions and 123 deletions
+9
View File
@@ -180,3 +180,12 @@ macro_rules! parse_param_no_err(
}
}
));
#[macro_export]
macro_rules! w_fut(
($p: expr) =>(
match w($p) {
Ok(p) => p,
Err(_) => return response(StatusCode::INTERNAL_SERVER_ERROR, "weak reference upgrade failed" ),
}
));