difftreelog
fix remove unneeded PhantomData
in: master
1 file changed
pallets/common/src/lib.rsdiffbeforeafterboth875875876enum LazyValueState<'a, T> {876enum LazyValueState<'a, T> {877 Pending(Box<dyn FnOnce() -> T + 'a>),877 Pending(Box<dyn FnOnce() -> T + 'a>),878 InProgress(PhantomData<sp_std::cell::Cell<T>>),878 InProgress,879 Computed(T),879 Computed(T),880}880}881881930 return;930 return;931 }931 }932932933 match sp_std::mem::replace(&mut self.state, InProgress(PhantomData)) {933 match sp_std::mem::replace(&mut self.state, InProgress) {934 Pending(f) => self.state = Computed(f()),934 Pending(f) => self.state = Computed(f()),935 _ => {935 _ => panic!("recursion isn't supported"),936 // Computed is ruled out by the above condition937 // InProgress is ruled out by not implementing Sync and absence of recursion938 unreachable!()939 }940 }936 }941 }937 }942}938}