proc-macro: check for non-args runtime calls added (#13742)

* proc-macro: check for non-args runtime calls added

* Update primitives/api/proc-macro/src/impl_runtime_apis.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: parity-processbot <>
This commit is contained in:
Michal Kucharczyk
2023-03-29 16:54:02 +02:00
committed by GitHub
parent c32b240df0
commit 469726ee74
@@ -79,7 +79,14 @@ fn generate_impl_call(
let pborrow = params.iter().map(|v| &v.2);
let decode_params = if params.is_empty() {
quote!()
quote!(
if !#input.is_empty() {
panic!(
"Bad input data provided to {}: expected no parameters, but input buffer is not empty.",
#fn_name_str
);
}
)
} else {
let let_binding = if params.len() == 1 {
quote! {