From ae913530fe5301277f97e9ba13781391acac3044 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Fri, 13 Oct 2023 11:12:47 +0000 Subject: [PATCH] fix: remove unneeded PhantomData --- --- a/pallets/common/src/lib.rs +++ b/pallets/common/src/lib.rs @@ -875,7 +875,7 @@ enum LazyValueState<'a, T> { Pending(Box T + 'a>), - InProgress(PhantomData>), + InProgress, Computed(T), } @@ -930,13 +930,9 @@ return; } - match sp_std::mem::replace(&mut self.state, InProgress(PhantomData)) { + match sp_std::mem::replace(&mut self.state, InProgress) { Pending(f) => self.state = Computed(f()), - _ => { - // Computed is ruled out by the above condition - // InProgress is ruled out by not implementing Sync and absence of recursion - unreachable!() - } + _ => panic!("recursion isn't supported"), } } } -- gitstuff