mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 17:11:02 +00:00
Attempt to remove the where bounds in arithmetic. (#7933)
* Attempt to remove the where bounds. * Fix further and further. * Format better. * Update primitives/npos-elections/src/lib.rs * fix build * remove unused
This commit is contained in:
@@ -27,7 +27,7 @@ use crate::{
|
||||
use sp_arithmetic::{
|
||||
helpers_128bit::multiply_by_rational,
|
||||
traits::{Bounded, Zero},
|
||||
InnerOf, Rational128,
|
||||
Rational128,
|
||||
};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
@@ -68,10 +68,7 @@ pub fn seq_phragmen<AccountId: IdentifierT, P: PerThing128>(
|
||||
initial_candidates: Vec<AccountId>,
|
||||
initial_voters: Vec<(AccountId, VoteWeight, Vec<AccountId>)>,
|
||||
balance: Option<(usize, ExtendedBalance)>,
|
||||
) -> Result<ElectionResult<AccountId, P>, crate::Error>
|
||||
where
|
||||
ExtendedBalance: From<InnerOf<P>>,
|
||||
{
|
||||
) -> Result<ElectionResult<AccountId, P>, crate::Error> {
|
||||
let (candidates, voters) = setup_inputs(initial_candidates, initial_voters);
|
||||
|
||||
let (candidates, mut voters) = seq_phragmen_core::<AccountId>(
|
||||
|
||||
Reference in New Issue
Block a user