Remove useless imports (#11136)

Because `TryInto`/`TryFrom` are in prelude by default from edition 2021

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
Qinxuan Chen
2022-04-04 03:44:29 +08:00
committed by GitHub
parent 98ed4afe45
commit 41c84b0b41
91 changed files with 81 additions and 176 deletions
@@ -110,8 +110,6 @@ where
#[test]
fn test_multiply_by_rational_saturating() {
use std::convert::TryInto;
let div = 100u32;
for value in 0..=div {
for p in 0..=div {
@@ -132,8 +130,6 @@ fn test_multiply_by_rational_saturating() {
#[test]
fn test_calculate_for_fraction_times_denominator() {
use std::convert::TryInto;
let curve = PiecewiseLinear {
points: &[
(Perbill::from_parts(0_000_000_000), Perbill::from_parts(0_500_000_000)),
@@ -29,7 +29,7 @@ use crate::{
#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};
use sp_core::U256;
use sp_std::{convert::TryFrom, fmt::Debug};
use sp_std::fmt::Debug;
/// Abstraction over a block header for a substrate chain.
#[derive(Encode, Decode, PartialEq, Eq, Clone, sp_core::RuntimeDebug, TypeInfo)]
+1 -1
View File
@@ -50,7 +50,7 @@ use sp_core::{
hash::{H256, H512},
sr25519,
};
use sp_std::{convert::TryFrom, prelude::*};
use sp_std::prelude::*;
use codec::{Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
+1 -7
View File
@@ -37,13 +37,7 @@ pub use sp_arithmetic::traits::{
UniqueSaturatedFrom, UniqueSaturatedInto, Zero,
};
use sp_core::{self, storage::StateVersion, Hasher, RuntimeDebug, TypeId};
use sp_std::{
self,
convert::{TryFrom, TryInto},
fmt::Debug,
marker::PhantomData,
prelude::*,
};
use sp_std::{self, fmt::Debug, marker::PhantomData, prelude::*};
#[cfg(feature = "std")]
use std::fmt::Display;
#[cfg(feature = "std")]