Use associated constant for max (#3375)

This commit is contained in:
Squirrel authored and GitHub committed 2021-06-28 11:32:33 +02:00
1 parent ab6c79ecb6
commit dcb08fd533
13 files changed
+44 -43

No files matched your search

+1 -1
View File
@@ -223,7 +223,7 @@ impl TableContextTrait for TableContext {
}
fn requisite_votes(&self, group: &ParaId) -> usize {
self.groups.get(group).map_or(usize::max_value(), |g| group_quorum(g.len()))
self.groups.get(group).map_or(usize::MAX, |g| group_quorum(g.len()))
}
}
@@ -32,7 +32,7 @@ impl UnifiedReputationChange {
Self::CostMajor(_) => -300_000,
Self::CostMinorRepeated(_) => -200_000,
Self::CostMajorRepeated(_) => -600_000,
Self::Malicious(_) => i32::min_value(),
Self::Malicious(_) => i32::MIN,
Self::BenefitMajorFirst(_) => 300_000,
Self::BenefitMajor(_) => 200_000,
Self::BenefitMinorFirst(_) => 15_000,