mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
remove unnessisary use statements due to 2021 core prelude (#4183)
Some traits are already included in the 2021 prelude and so shouldn't be needed to use explicitly: use `convert::TryFrom`, `convert::TryInto`, and `iter::FromIterator` are removed. ( https://doc.rust-lang.org/core/prelude/rust_2021/ ) No breaking changes or change of functionality, so I think no PR doc is needed in this case. (Motivation: Removes some references to `sp-std`)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
name = "polkadot-sdk-frame"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
homepage = "paritytech.github.io"
|
||||
repository.workspace = true
|
||||
|
||||
@@ -19,11 +19,7 @@
|
||||
|
||||
#![cfg(feature = "runtime-benchmarks")]
|
||||
|
||||
use core::{
|
||||
cmp,
|
||||
convert::{TryFrom, TryInto},
|
||||
mem::size_of,
|
||||
};
|
||||
use core::{cmp, mem::size_of};
|
||||
use sp_runtime::traits::{Bounded, Hash, StaticLookup};
|
||||
|
||||
use frame_benchmarking::{account, v2::*, BenchmarkError};
|
||||
|
||||
@@ -101,7 +101,7 @@ use sp_runtime::{
|
||||
traits::{Dispatchable, Saturating, StaticLookup, Zero},
|
||||
DispatchError, RuntimeDebug,
|
||||
};
|
||||
use sp_std::{convert::TryInto, prelude::*};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
use frame_support::{
|
||||
dispatch::{DispatchResult, DispatchResultWithPostInfo, GetDispatchInfo, PostDispatchInfo},
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
//! Test utilities
|
||||
|
||||
use core::convert::{TryFrom, TryInto};
|
||||
pub use sp_core::H256;
|
||||
use sp_runtime::traits::Hash;
|
||||
pub use sp_runtime::{
|
||||
|
||||
@@ -19,7 +19,7 @@ use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use frame_support::{traits::ConstU32, BoundedVec};
|
||||
use scale_info::TypeInfo;
|
||||
use sp_runtime::RuntimeDebug;
|
||||
use sp_std::{convert::TryInto, prelude::*};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
/// A Multihash instance that only supports the basic functionality and no hashing.
|
||||
#[derive(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "pallet-example-frame-crate"
|
||||
version = "0.0.1"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
license = "MIT-0"
|
||||
homepage = "https://substrate.io"
|
||||
repository.workspace = true
|
||||
|
||||
@@ -4,7 +4,7 @@ name = "pallet-mixnet"
|
||||
version = "0.4.0"
|
||||
license = "Apache-2.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
homepage = "https://substrate.io"
|
||||
repository = "https://github.com/paritytech/substrate/"
|
||||
readme = "README.md"
|
||||
|
||||
@@ -47,7 +47,7 @@ pub mod weights;
|
||||
pub use pallet::*;
|
||||
use sp_core::OpaquePeerId as PeerId;
|
||||
use sp_runtime::traits::StaticLookup;
|
||||
use sp_std::{collections::btree_set::BTreeSet, iter::FromIterator, prelude::*};
|
||||
use sp_std::{collections::btree_set::BTreeSet, prelude::*};
|
||||
pub use weights::WeightInfo;
|
||||
|
||||
type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
|
||||
|
||||
@@ -79,7 +79,6 @@ pub mod mock;
|
||||
mod tests;
|
||||
pub mod weights;
|
||||
|
||||
use core::convert::TryInto;
|
||||
use frame_support::{
|
||||
defensive_assert,
|
||||
pallet_prelude::*,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "pallet-sassafras"
|
||||
version = "0.3.5-dev"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://substrate.io"
|
||||
repository = "https://github.com/paritytech/substrate/"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
//! RPC interface for the transaction payment pallet.
|
||||
|
||||
use std::{convert::TryInto, sync::Arc};
|
||||
use std::sync::Arc;
|
||||
|
||||
use codec::{Codec, Decode};
|
||||
use jsonrpsee::{
|
||||
|
||||
@@ -87,7 +87,7 @@ use frame_support::{
|
||||
};
|
||||
use frame_system::pallet_prelude::*;
|
||||
use sp_runtime::{traits::Dispatchable, DispatchResult};
|
||||
use sp_std::{convert::TryInto, prelude::*};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
pub use pallet::*;
|
||||
pub use weights::*;
|
||||
|
||||
Reference in New Issue
Block a user