use thiserror instead of derive_more for error handling (#10696)

* use thiserror instead of derive_more for error handling

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Update utils/prometheus/src/lib.rs

* Update utils/prometheus/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Qinxuan Chen
2022-01-26 03:48:46 +08:00
committed by GitHub
parent 38d94d6323
commit e956c2e1c7
47 changed files with 378 additions and 357 deletions
@@ -26,7 +26,7 @@ use sp_runtime::transaction_validity::{
pub type Result<T> = std::result::Result<T, Error>;
/// Transaction pool error type.
#[derive(Debug, thiserror::Error, derive_more::From)]
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
#[error("Unknown transaction validity: {0:?}")]
@@ -64,7 +64,6 @@ pub enum Error {
#[error("Transaction cannot be propagated and the local node does not author blocks")]
Unactionable,
#[from(ignore)]
#[error("{0}")]
InvalidBlockId(String),