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:
Squirrel
2024-04-28 16:29:21 +01:00
committed by GitHub
parent 73b9a8391f
commit 954150f3b5
56 changed files with 46 additions and 82 deletions
+1 -5
View File
@@ -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};
+1 -1
View File
@@ -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},
-1
View File
@@ -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::{
+1 -1
View File
@@ -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(