changed long type to use existing type alias

This commit is contained in:
erhodes 2022-06-23 17:17:16 -06:00
parent afe3ae5044
commit 39be8c36d4
1 changed files with 3 additions and 7 deletions

View File

@ -212,14 +212,10 @@ impl<B> ErrorHandlers<B> {
/// Otherwise, fall back on the appropriate default handler. /// Otherwise, fall back on the appropriate default handler.
fn get_handler<'a>( fn get_handler<'a>(
status: &StatusCode, status: &StatusCode,
default_client: Option< default_client: Option<&'a ErrorHandler<B>>,
&'a dyn Fn(ServiceResponse<B>) -> Result<ErrorHandlerResponse<B>>, default_server: Option<&'a ErrorHandler<B>>,
>,
default_server: Option<
&'a dyn Fn(ServiceResponse<B>) -> Result<ErrorHandlerResponse<B>>,
>,
handlers: &'a Handlers<B>, handlers: &'a Handlers<B>,
) -> Option<&'a dyn Fn(ServiceResponse<B>) -> Result<ErrorHandlerResponse<B>>> { ) -> Option<&'a ErrorHandler<B>> {
handlers handlers
.get(status) .get(status)
.map(|h| h.as_ref()) .map(|h| h.as_ref())