clean up ref mapping with GATs

This commit is contained in:
Evan Almloff committed 2023-11-02 19:35:53 -05:00
1 parent 90e04edcdf
commit 0a8de1d40f
6 files changed
+245 -150

No files matched your search

+1 -2
View File
@@ -75,7 +75,7 @@ where
pub fn selector<R: PartialEq, S: Storage<SignalData<R>>>(
mut f: impl FnMut() -> R + 'static,
) -> ReadOnlySignal<R, S> {
let state = Signal::<R> {
let state = Signal::<R, S> {
inner: CopyValue::invalid(),
};
let effect = Effect {
@@ -89,7 +89,6 @@ pub fn selector<R: PartialEq, S: Storage<SignalData<R>>>(
}
state.inner.value.set(SignalData {
subscribers: Default::default(),
effect_subscribers: Default::default(),
update_any: schedule_update_any().expect("in a virtual dom"),
value: f(),
effect_stack: get_effect_stack(),