move generics of election trait to associated types (#10475)

* move generics of election trait to associated types

* fix doctest
This commit is contained in:
Kian Paimani authored and GitHub committed 2021-12-16 06:24:28 +00:00
1 parent 1b0be8ae06
commit f10203c793
9 files changed
+101 -54

No files matched your search

@@ -55,11 +55,8 @@ pub async fn execute<Runtime: crate::RuntimeT, Block: BlockT + DeserializeOwned>
<Runtime as pallet_staking::Config>::SortedListProvider::count(),
);
let voters = <pallet_staking::Pallet<Runtime> as ElectionDataProvider<
Runtime::AccountId,
Runtime::BlockNumber,
>>::voters(voter_limit)
.unwrap();
let voters =
<pallet_staking::Pallet<Runtime> as ElectionDataProvider>::voters(voter_limit).unwrap();
let mut voters_nominator_only = voters
.iter()