mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 16:31:07 +00:00
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:
@@ -25,7 +25,7 @@ use sc_keystore::LocalKeystore;
|
||||
use sc_service::config::{BasePath, KeystoreConfig};
|
||||
use sp_core::crypto::{KeyTypeId, SecretString};
|
||||
use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr};
|
||||
use std::{convert::TryFrom, sync::Arc};
|
||||
use std::sync::Arc;
|
||||
|
||||
/// The `insert` command
|
||||
#[derive(Debug, Clone, Parser)]
|
||||
|
||||
@@ -31,7 +31,7 @@ use sp_core::{
|
||||
Pair,
|
||||
};
|
||||
use sp_runtime::{traits::IdentifyAccount, MultiSigner};
|
||||
use std::{convert::TryFrom, io::Read, path::PathBuf};
|
||||
use std::{io::Read, path::PathBuf};
|
||||
|
||||
/// Public key type for Runtime
|
||||
pub type PublicFor<P> = <P as sp_core::Pair>::Public;
|
||||
|
||||
@@ -66,7 +66,7 @@ impl VerifyCmd {
|
||||
fn verify<Pair>(sig_data: Vec<u8>, message: Vec<u8>, uri: &str) -> error::Result<()>
|
||||
where
|
||||
Pair: sp_core::Pair,
|
||||
Pair::Signature: for<'a> std::convert::TryFrom<&'a [u8]>,
|
||||
Pair::Signature: for<'a> TryFrom<&'a [u8]>,
|
||||
{
|
||||
let signature =
|
||||
Pair::Signature::try_from(&sig_data).map_err(|_| error::Error::SignatureFormatInvalid)?;
|
||||
|
||||
@@ -80,19 +80,19 @@ pub enum Error {
|
||||
GlobalLoggerError(#[from] sc_tracing::logging::Error),
|
||||
}
|
||||
|
||||
impl std::convert::From<&str> for Error {
|
||||
impl From<&str> for Error {
|
||||
fn from(s: &str) -> Error {
|
||||
Error::Input(s.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::From<String> for Error {
|
||||
impl From<String> for Error {
|
||||
fn from(s: String) -> Error {
|
||||
Error::Input(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::From<crypto::PublicError> for Error {
|
||||
impl From<crypto::PublicError> for Error {
|
||||
fn from(e: crypto::PublicError) -> Error {
|
||||
Error::InvalidUri(e)
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits::{Block as BlockT, NumberFor},
|
||||
};
|
||||
use std::{convert::TryFrom, fmt::Debug, str::FromStr};
|
||||
use std::{fmt::Debug, str::FromStr};
|
||||
|
||||
pub use crate::params::{
|
||||
database_params::*, import_params::*, keystore_params::*, network_params::*,
|
||||
|
||||
Reference in New Issue
Block a user