Add hardcoded override to ElectionScore (#455)

* Add hardcoded override to ElectionScore so that we can give it the traits it needs

* cargo fmt + another comment

* copy over custom trait impls too
This commit is contained in:
James Wilson
2022-02-16 17:02:32 +00:00
committed by GitHub
parent 0e0553a022
commit eeb8b4b741
2 changed files with 44 additions and 0 deletions
+6
View File
@@ -147,6 +147,12 @@ impl RuntimeGenerator {
"frame_support::traits::misc::WrapperKeepOpaque",
parse_quote!(::subxt::WrapperKeepOpaque),
),
// We override this because it's used as a key in a BTreeMap, and so we
// need to implement some extra derives for it for that to compile.
(
"sp_npos_elections::ElectionScore",
parse_quote!(::subxt::ElectionScore),
),
]
.iter()
.map(|(path, substitute): &(&str, syn::TypePath)| {