Merge branch 'DioxusLabs:master' into add-onunmount-hook

This commit is contained in:
ealmloff authored and GitHub committed 2023-07-03 12:09:13 -07:00
commit d1cd4851aa
216 files changed
+18007 -685

No files matched your search

+8
View File
@@ -89,6 +89,14 @@ pub struct UseFuture<T> {
values: Rc<RefCell<Vec<*mut T>>>,
}
impl<T> Drop for UseFuture<T> {
fn drop(&mut self) {
for value in self.values.take().into_iter() {
drop(unsafe { Box::from_raw(value) })
}
}
}
pub enum UseFutureState<'a, T> {
Pending,
Complete(&'a T),