mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
put TryInto and TryFrom in sp_std::prelude (#10183)
* Switch to Rust 2021 * Update trybuild to fix errors * half baked * fix * remove unused import * remove more warnings Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
@@ -26,10 +26,6 @@ use rand::{prelude::SliceRandom, rngs::SmallRng, SeedableRng};
|
||||
use sp_arithmetic::{per_things::Percent, traits::One};
|
||||
use sp_npos_elections::IndexAssignment;
|
||||
use sp_runtime::InnerOf;
|
||||
use sp_std::{
|
||||
boxed::Box,
|
||||
convert::{TryFrom, TryInto},
|
||||
};
|
||||
|
||||
const SEED: u32 = 999;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! Some helper functions/macros for this crate.
|
||||
|
||||
use super::{Config, SolutionTargetIndexOf, SolutionVoterIndexOf, VoteWeight};
|
||||
use sp_std::{collections::btree_map::BTreeMap, convert::TryInto, prelude::*};
|
||||
use sp_std::{collections::btree_map::BTreeMap, prelude::*};
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! log {
|
||||
|
||||
@@ -255,7 +255,7 @@ use sp_runtime::{
|
||||
},
|
||||
DispatchError, PerThing, Perbill, RuntimeDebug, SaturatedConversion,
|
||||
};
|
||||
use sp_std::{convert::TryInto, prelude::*};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
mod benchmarking;
|
||||
|
||||
@@ -40,7 +40,7 @@ use sp_runtime::{
|
||||
traits::{BlakeTwo256, IdentityLookup},
|
||||
PerU16,
|
||||
};
|
||||
use std::{convert::TryFrom, sync::Arc};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>;
|
||||
pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic<AccountId, Call, (), ()>;
|
||||
|
||||
@@ -35,7 +35,7 @@ use sp_runtime::{
|
||||
offchain::storage::{MutateStorageError, StorageValueRef},
|
||||
DispatchError, SaturatedConversion,
|
||||
};
|
||||
use sp_std::{boxed::Box, cmp::Ordering, convert::TryFrom, vec::Vec};
|
||||
use sp_std::{cmp::Ordering, prelude::*};
|
||||
|
||||
/// Storage key used to store the last block number at which offchain worker ran.
|
||||
pub(crate) const OFFCHAIN_LAST_BLOCK: &[u8] = b"parity/multi-phase-unsigned-election";
|
||||
|
||||
Reference in New Issue
Block a user