mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
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:
@@ -69,7 +69,7 @@ const RANDOM_MATERIAL_LEN: u32 = 81;
|
||||
|
||||
fn block_number_to_index<T: Trait>(block_number: T::BlockNumber) -> usize {
|
||||
// on_initialize is called on the first block after genesis
|
||||
let index = (block_number - 1.into()) % RANDOM_MATERIAL_LEN.into();
|
||||
let index = (block_number - 1u32.into()) % RANDOM_MATERIAL_LEN.into();
|
||||
index.try_into().ok().expect("Something % 81 is always smaller than usize; qed")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user