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
@@ -87,7 +87,7 @@ where
// Reached end of the chain.
None => return Poll::Ready(Ok(())),
}
if (block % 10000.into()).is_zero() {
if (block % 10000u32.into()).is_zero() {
info!("#{}", block);
}
if block == last {
@@ -200,7 +200,7 @@ impl<B: BlockT> Speedometer<B> {
/// Creates a fresh Speedometer.
fn new() -> Self {
Self {
best_number: NumberFor::<B>::from(0),
best_number: NumberFor::<B>::from(0u32),
last_number: None,
last_update: Instant::now(),
}
@@ -232,7 +232,7 @@ impl<B: BlockT> Speedometer<B> {
} else {
// If the number of blocks can't be converted to a regular integer, then we need a more
// algebraic approach and we stay within the realm of integers.
let one_thousand = NumberFor::<B>::from(1_000);
let one_thousand = NumberFor::<B>::from(1_000u32);
let elapsed = NumberFor::<B>::from(
<u32 as TryFrom<_>>::try_from(elapsed_ms).unwrap_or(u32::max_value())
);