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:
Kian Paimani
2021-01-21 09:39:30 +00:00
committed by GitHub
parent 9031c35114
commit 0dd8cd6277
11 changed files with 125 additions and 139 deletions
@@ -17,7 +17,6 @@
//! An implementation of [`ElectionProvider`] that does an on-chain sequential phragmen.
use sp_arithmetic::InnerOf;
use crate::{ElectionDataProvider, ElectionProvider};
use sp_npos_elections::*;
use sp_std::{collections::btree_map::BTreeMap, marker::PhantomData, prelude::*};
@@ -58,10 +57,7 @@ pub trait Config {
type DataProvider: ElectionDataProvider<Self::AccountId, Self::BlockNumber>;
}
impl<T: Config> ElectionProvider<T::AccountId, T::BlockNumber> for OnChainSequentialPhragmen<T>
where
ExtendedBalance: From<InnerOf<T::Accuracy>>,
{
impl<T: Config> ElectionProvider<T::AccountId, T::BlockNumber> for OnChainSequentialPhragmen<T> {
type Error = Error;
type DataProvider = T::DataProvider;