mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 04:07:57 +00:00
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:
@@ -618,9 +618,7 @@ impl State {
|
||||
try_runtime_check: bool,
|
||||
) -> sc_cli::Result<RemoteExternalities<Block>>
|
||||
where
|
||||
Block::Hash: FromStr,
|
||||
Block::Header: DeserializeOwned,
|
||||
Block::Hash: DeserializeOwned,
|
||||
<Block::Hash as FromStr>::Err: Debug,
|
||||
{
|
||||
let builder = match self {
|
||||
@@ -732,7 +730,6 @@ impl TryRuntimeCmd {
|
||||
where
|
||||
Block: BlockT<Hash = H256> + DeserializeOwned,
|
||||
Block::Header: DeserializeOwned,
|
||||
Block::Hash: FromStr,
|
||||
<Block::Hash as FromStr>::Err: Debug,
|
||||
<NumberFor<Block> as FromStr>::Err: Debug,
|
||||
<NumberFor<Block> as TryInto<u64>>::Error: Debug,
|
||||
@@ -798,7 +795,6 @@ impl CliConfiguration for TryRuntimeCmd {
|
||||
/// Get the hash type of the generic `Block` from a `hash_str`.
|
||||
pub(crate) fn hash_of<Block: BlockT>(hash_str: &str) -> sc_cli::Result<Block::Hash>
|
||||
where
|
||||
Block::Hash: FromStr,
|
||||
<Block::Hash as FromStr>::Err: Debug,
|
||||
{
|
||||
hash_str
|
||||
|
||||
Reference in New Issue
Block a user