Skip to content

Commit

Permalink
Fix compilation on 1.66 nightly (#12363)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr committed Sep 30, 2022
1 parent 8ab83a8 commit c6ebc1e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions primitives/state-machine/src/trie_backend_essence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ impl<S: TrieBackendStorage<H>, H: Hasher, C: AsLocalTrieCache<H>> TrieBackendEss
) -> R {
let storage_root = storage_root.unwrap_or_else(|| self.root);
let mut recorder = self.recorder.as_ref().map(|r| r.as_trie_recorder());
let recorder = recorder.as_mut().map(|r| r as _);
let recorder = match recorder.as_mut() {
Some(recorder) => Some(recorder as &mut dyn TrieRecorder<H::Out>),
None => None,
};

let mut cache = self
.trie_node_cache
Expand Down Expand Up @@ -216,7 +219,10 @@ impl<S: TrieBackendStorage<H>, H: Hasher, C: AsLocalTrieCache<H>> TrieBackendEss
) -> (Option<H::Out>, R),
) -> R {
let mut recorder = self.recorder.as_ref().map(|r| r.as_trie_recorder());
let recorder = recorder.as_mut().map(|r| r as _);
let recorder = match recorder.as_mut() {
Some(recorder) => Some(recorder as &mut dyn TrieRecorder<H::Out>),
None => None,
};

let result = if let Some(local_cache) = self.trie_node_cache.as_ref() {
let mut cache = local_cache.as_local_trie_cache().as_trie_db_mut_cache();
Expand Down

0 comments on commit c6ebc1e

Please sign in to comment.