avoid some clippy warnings

This commit is contained in:
Dietmar Maurer 2019-10-25 18:44:51 +02:00
parent 00d669295f
commit d26fde6986
2 changed files with 6 additions and 6 deletions

View File

@ -54,15 +54,15 @@ impl <E: RpcEnvironment + Clone> H2Service<E> {
match self.router.find_method(&components, method, &mut uri_param) {
MethodDefinition::None => {
let err = http_err!(NOT_FOUND, "Path not found.".to_string());
return Box::new(future::ok((formatter.format_error)(err)));
Box::new(future::ok((formatter.format_error)(err)))
}
MethodDefinition::Simple(api_method) => {
return crate::server::rest::handle_sync_api_request(
self.rpcenv.clone(), api_method, formatter, parts, body, uri_param);
crate::server::rest::handle_sync_api_request(
self.rpcenv.clone(), api_method, formatter, parts, body, uri_param)
}
MethodDefinition::Async(async_method) => {
return crate::server::rest::handle_async_api_request(
self.rpcenv.clone(), async_method, formatter, parts, body, uri_param);
crate::server::rest::handle_async_api_request(
self.rpcenv.clone(), async_method, formatter, parts, body, uri_param)
}
}
}

View File

@ -484,7 +484,7 @@ fn handle_static_file_download(filename: PathBuf) -> BoxFut {
}
});
return Box::new(response);
Box::new(response)
}
fn extract_auth_data(headers: &http::HeaderMap) -> (Option<String>, Option<String>) {