mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 14:51: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:
@@ -30,14 +30,7 @@
|
||||
//!
|
||||
//! NOTE: Aura itself is designed to be generic over the crypto used.
|
||||
#![forbid(missing_docs, unsafe_code)]
|
||||
use std::{
|
||||
convert::{TryFrom, TryInto},
|
||||
fmt::Debug,
|
||||
hash::Hash,
|
||||
marker::PhantomData,
|
||||
pin::Pin,
|
||||
sync::Arc,
|
||||
};
|
||||
use std::{fmt::Debug, hash::Hash, marker::PhantomData, pin::Pin, sync::Arc};
|
||||
|
||||
use futures::prelude::*;
|
||||
use log::{debug, trace};
|
||||
@@ -517,7 +510,7 @@ pub enum Error<B: BlockT> {
|
||||
Inherent(sp_inherents::Error),
|
||||
}
|
||||
|
||||
impl<B: BlockT> std::convert::From<Error<B>> for String {
|
||||
impl<B: BlockT> From<Error<B>> for String {
|
||||
fn from(error: Error<B>) -> String {
|
||||
error.to_string()
|
||||
}
|
||||
|
||||
@@ -69,7 +69,6 @@
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
collections::{HashMap, HashSet},
|
||||
convert::TryInto,
|
||||
future::Future,
|
||||
pin::Pin,
|
||||
sync::Arc,
|
||||
@@ -320,7 +319,7 @@ pub enum Error<B: BlockT> {
|
||||
ForkTree(Box<fork_tree::Error<sp_blockchain::Error>>),
|
||||
}
|
||||
|
||||
impl<B: BlockT> std::convert::From<Error<B>> for String {
|
||||
impl<B: BlockT> From<Error<B>> for String {
|
||||
fn from(error: Error<B>) -> String {
|
||||
error.to_string()
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ impl Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::From<Error> for jsonrpc_core::Error {
|
||||
impl From<Error> for jsonrpc_core::Error {
|
||||
fn from(error: Error) -> Self {
|
||||
jsonrpc_core::Error {
|
||||
code: jsonrpc_core::ErrorCode::ServerError(error.to_code()),
|
||||
|
||||
@@ -119,13 +119,13 @@ pub enum Error<B: BlockT> {
|
||||
Other(String),
|
||||
}
|
||||
|
||||
impl<B: BlockT> std::convert::From<Error<B>> for String {
|
||||
impl<B: BlockT> From<Error<B>> for String {
|
||||
fn from(error: Error<B>) -> String {
|
||||
error.to_string()
|
||||
}
|
||||
}
|
||||
|
||||
impl<B: BlockT> std::convert::From<Error<B>> for ConsensusError {
|
||||
impl<B: BlockT> From<Error<B>> for ConsensusError {
|
||||
fn from(error: Error<B>) -> ConsensusError {
|
||||
ConsensusError::ClientImport(error.to_string())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user