refactor: define trait HashOutput for some Hash associate type (#14220)

* define trait `HashOutput`

* improve

* improve

* Update primitives/runtime/src/traits.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* remove `Block::Hash: Ord`

* fmt

* add `MaybeFromStr`

* cleanup

* fix

* remove useless `HashOutput`

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
yjh
2023-06-08 10:02:13 +08:00
committed by GitHub
parent c31c6a1a73
commit ddb46a8aa0
19 changed files with 85 additions and 146 deletions
@@ -25,14 +25,12 @@ use crate::{
use sc_cli::{CliConfiguration, ImportParams, Result, SharedParams};
use sc_service::{Configuration, NativeExecutionDispatch};
use sp_runtime::traits::Block;
use std::str::FromStr;
impl InspectCmd {
/// Run the inspect command, passing the inspector.
pub fn run<B, RA, D>(&self, config: Configuration) -> Result<()>
where
B: Block,
B::Hash: FromStr,
RA: Send + Sync + 'static,
D: NativeExecutionDispatch + 'static,
{