Make Substrate compile with latest nightly (#7381)

* Try to get it compiling

* One more

* Make stable happy

* Make stable even more happy ;)

* Update shell.nix
This commit is contained in:
Bastian Köcher
2020-10-23 21:08:04 +02:00
committed by GitHub
parent 4366fe366a
commit 5808f467c5
29 changed files with 63 additions and 57 deletions
@@ -308,7 +308,7 @@ pub(crate) fn create_stake_of(stakes: &[(AccountId, VoteWeight)])
pub fn check_assignments_sum<T: PerThing>(assignments: Vec<Assignment<AccountId, T>>) {
for Assignment { distribution, .. } in assignments {
let mut sum: u128 = Zero::zero();
distribution.iter().for_each(|(_, p)| sum += p.deconstruct().saturated_into());
distribution.iter().for_each(|(_, p)| sum += p.deconstruct().saturated_into::<u128>());
assert_eq!(sum, T::ACCURACY.saturated_into(), "Assignment ratio sum is not 100%");
}
}