chore: clean up the repo some

This commit is contained in:
Jonathan Kelley committed 2022-12-06 17:50:25 -08:00
1 parent 5a0ae67ccb
commit 5673017def
13 files changed
+30 -27

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ macro_rules! use_callback {
)
};
}
pub fn use_callback<'a, T, R, F>(cx: &'a ScopeState, make: impl FnOnce() -> R) -> impl FnMut(T) + 'a
pub fn use_callback<T, R, F>(cx: &ScopeState, make: impl FnOnce() -> R) -> impl FnMut(T) + '_
where
R: FnMut(T) -> F + 'static,
F: Future<Output = ()> + 'static,
+2 -5
View File
@@ -51,7 +51,7 @@ where
// Clone in our cells
let values = state.values.clone();
let _schedule_update = state.update.clone();
let schedule_update = state.update.clone();
let waker = state.waker.clone();
// Cancel the current future
@@ -66,10 +66,7 @@ where
// if there's a waker, we dont re-render the component. Instead we just progress that future
match waker.borrow().as_ref() {
Some(waker) => waker.wake_by_ref(),
None => {
// schedule_update()
}
None => schedule_update(),
}
})));
}