Add some trivial improvements to primitives runtime (#8528)

* Add some trivial improvements

* Finish primitives/runtime
This commit is contained in:
Liu-Cheng Xu
2021-04-06 02:20:36 +08:00
committed by GitHub
parent b16bc0552e
commit 00432a5ab7
10 changed files with 96 additions and 110 deletions
@@ -91,7 +91,7 @@ impl<Number, Hash> Decode for Header<Number, Hash> where
Hash::Output: Decode,
{
fn decode<I: Input>(input: &mut I) -> Result<Self, Error> {
Ok(Header {
Ok(Self {
parent_hash: Decode::decode(input)?,
number: <<Number as HasCompact>::Type>::decode(input)?.into(),
state_root: Decode::decode(input)?,
@@ -160,7 +160,7 @@ impl<Number, Hash> traits::Header for Header<Number, Hash> where
parent_hash: Self::Hash,
digest: Digest<Self::Hash>,
) -> Self {
Header {
Self {
number,
extrinsics_root,
state_root,