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
@@ -19,7 +19,7 @@
use codec::{Decode, Encode};
use num_traits::{One, Zero};
use sp_std::{cell::RefCell, cmp::Ordering, convert::TryFrom, ops, prelude::*, vec};
use sp_std::{cell::RefCell, cmp::Ordering, ops, prelude::*, vec};
// A sensible value for this would be half of the dword size of the host machine. Since the
// runtime is compiled to 32bit webassembly, using 32 and 64 for single and double respectively
@@ -664,7 +664,6 @@ pub mod tests {
#[test]
fn can_try_build_numbers_from_types() {
use sp_std::convert::TryFrom;
assert_eq!(u64::try_from(with_limbs(1)).unwrap(), 1);
assert_eq!(u64::try_from(with_limbs(2)).unwrap(), u32::MAX as u64 + 2);
assert_eq!(u64::try_from(with_limbs(3)).unwrap_err(), "cannot fit a number into u64");