From c5f59ed83dfb3be8d8cd08121cbc024726e99fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Mon, 27 Jul 2020 10:28:05 +0200 Subject: [PATCH] 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. --- cumulus/runtime/src/validate_block/implementation.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cumulus/runtime/src/validate_block/implementation.rs b/cumulus/runtime/src/validate_block/implementation.rs index d891017739..fd324f7592 100644 --- a/cumulus/runtime/src/validate_block/implementation.rs +++ b/cumulus/runtime/src/validate_block/implementation.rs @@ -253,8 +253,9 @@ impl Storage for WitnessStorage { }; 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); + } } }