Less slices (#9176)

* Less slices

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Squirrel
2021-06-23 13:33:48 +01:00
committed by GitHub
parent 7b50bbb9bf
commit 07449840bd
11 changed files with 41 additions and 46 deletions
@@ -637,7 +637,7 @@ where
}
#[cfg(feature = "std")]
fn storage_changes_root(&mut self, parent_hash: &[u8]) -> Result<Option<Vec<u8>>, ()> {
fn storage_changes_root(&mut self, mut parent_hash: &[u8]) -> Result<Option<Vec<u8>>, ()> {
let _guard = guard();
if let Some(ref root) = self.storage_transaction_cache.changes_trie_transaction_storage_root {
trace!(
@@ -653,7 +653,7 @@ where
let root = self.overlay.changes_trie_root(
self.backend,
self.changes_trie_state.as_ref(),
Decode::decode(&mut &parent_hash[..]).map_err(|e|
Decode::decode(&mut parent_hash).map_err(|e|
trace!(
target: "state",
"Failed to decode changes root parent hash: {}",