Use MAX associated const (#9196)

* Use MAX associated const
This commit is contained in:
Squirrel
2021-06-24 11:53:49 +01:00
committed by GitHub
parent 09d9c2c9f6
commit ea1f21a904
56 changed files with 178 additions and 178 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ fn slot_author<P: Pair>(slot: Slot, authorities: &[AuthorityId<P>]) -> Option<&A
let idx = *slot % (authorities.len() as u64);
assert!(
idx <= usize::max_value() as u64,
idx <= usize::MAX as u64,
"It is impossible to have a vector with length beyond the address space; qed",
);