Try to workaround the invalid compilation (#159)

There is probably some bug in rustc which result in an invalid
compilation when using an `expect` at the given position. I'm still not
sure why this is happening, but this fix should fix it for now.
This commit is contained in:
Bastian Köcher
2020-07-27 10:28:05 +02:00
committed by GitHub
parent 93e0ae472b
commit c5f59ed83d
@@ -253,8 +253,9 @@ impl<B: BlockT> Storage for WitnessStorage<B> {
};
for x in TrieDBIterator::new_prefixed(&trie, prefix).expect("Creates trie iterator") {
let (key, _) = x.expect("Iterating trie iterator");
self.overlay.insert(key, None);
if let Ok((key, _)) = x {
self.overlay.insert(key, None);
}
}
}