This commit is contained in:
iris committed 2025-12-20 00:27:08 -05:00
1 parent fabc7d0b90
commit 32ca4ec5a6
2 files changed
+4 -12

No files matched your search

+3 -3
View File
@@ -1,3 +1,3 @@
pub struct DynState { // pub struct DynState {
//
} // }
+1 -9
View File
@@ -3,20 +3,12 @@ use crate::{
util::{DynBorrower, HashSet, SlotVec, forget_mut, to_mut}, util::{DynBorrower, HashSet, SlotVec, forget_mut, to_mut},
}; };
#[derive(Default)]
pub struct Widgets { pub struct Widgets {
pub needs_redraw: HashSet<WidgetId>, pub needs_redraw: HashSet<WidgetId>,
vec: SlotVec<WidgetData>, vec: SlotVec<WidgetData>,
} }
impl Default for Widgets {
fn default() -> Self {
Self {
needs_redraw: Default::default(),
vec: Default::default(),
}
}
}
impl Widgets { impl Widgets {
pub fn has_updates(&self) -> bool { pub fn has_updates(&self) -> bool {
!self.needs_redraw.is_empty() !self.needs_redraw.is_empty()