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
+2 -4
View File
@@ -35,8 +35,6 @@ use schnorrkel::{
#[cfg(feature = "full_crypto")]
use sp_std::vec::Vec;
#[cfg(feature = "std")]
use std::convert::TryFrom;
#[cfg(feature = "std")]
use substrate_bip39::mini_secret_from_entropy;
use crate::{
@@ -142,7 +140,7 @@ impl std::str::FromStr for Public {
}
}
impl sp_std::convert::TryFrom<&[u8]> for Public {
impl TryFrom<&[u8]> for Public {
type Error = ();
fn try_from(data: &[u8]) -> Result<Self, Self::Error> {
@@ -215,7 +213,7 @@ impl<'de> Deserialize<'de> for Public {
#[derive(Encode, Decode, MaxEncodedLen, PassByInner, TypeInfo, PartialEq, Eq)]
pub struct Signature(pub [u8; 64]);
impl sp_std::convert::TryFrom<&[u8]> for Signature {
impl TryFrom<&[u8]> for Signature {
type Error = ();
fn try_from(data: &[u8]) -> Result<Self, Self::Error> {