Simplify runtime api error handling (#8114)

* Ahh

* Work work work

* Fix all the compilation errors

* Fix test

* More fixes...
This commit is contained in:
Bastian Köcher
2021-02-15 12:55:40 +01:00
committed by GitHub
parent b5e692104c
commit 33f9becf41
48 changed files with 270 additions and 415 deletions
@@ -99,6 +99,7 @@ pub fn replace_wild_card_parameter_names(input: &mut Signature) {
pub fn fold_fn_decl_for_client_side(
input: &mut Signature,
block_id: &TokenStream,
crate_: &TokenStream,
) {
replace_wild_card_parameter_names(input);
@@ -109,7 +110,7 @@ pub fn fold_fn_decl_for_client_side(
// Wrap the output in a `Result`
input.output = {
let ty = return_type_extract_type(&input.output);
parse_quote!( -> std::result::Result<#ty, Self::Error> )
parse_quote!( -> std::result::Result<#ty, #crate_::ApiError> )
};
}