Reduce number of unwwaps in api crate (#2681)
* Reduce number of unwwaps in api crate * Format use section
This commit is contained in:
@@ -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" ),
|
||||
}
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user