Fix codegen for codec::Compact as type parameters (#651)

* Add failing test for compact generic parameter

* WIP refactor type generation

* Fmt

* Remove deprecated rustfmt optionns

* Remove license template path

* Update parent type parameter visitor

* Introduce different methods for generating a type path for a field

* Add comment

* Fix weights refs

* Add extra compact test cases

* Fmt
This commit is contained in:
Andrew Jones
2022-09-21 10:03:47 +01:00
committed by GitHub
parent 033ceb246f
commit 3bf7ddc18c
8 changed files with 310 additions and 172 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ pub fn generate_constants(
let constant_hash = subxt_metadata::get_constant_hash(metadata, pallet_name, constant_name)
.unwrap_or_else(|_| abort_call_site!("Metadata information for the constant {}_{} could not be found", pallet_name, constant_name));
let return_ty = type_gen.resolve_type_path(constant.ty.id(), &[]);
let return_ty = type_gen.resolve_type_path(constant.ty.id());
let docs = &constant.docs;
quote! {