Remove hand-written ResolvedWindowRules::empty()

It was only needed to be const fn.
This commit is contained in:
Ivan Molodetskikh
2025-11-24 15:19:01 +03:00
parent 0920ea9f9f
commit 9eeedff629
4 changed files with 8 additions and 76 deletions
+3 -2
View File
@@ -33,6 +33,7 @@ struct TestWindowInner {
pub struct TestWindow {
id: usize,
inner: Rc<RefCell<TestWindowInner>>,
rules: ResolvedWindowRules,
}
impl TestWindow {
@@ -54,6 +55,7 @@ impl TestWindow {
csd_shadow_width: 0,
csd_shadow_buffer: SolidColorBuffer::new((0., 0.), [0., 0., 0., 0.3]),
})),
rules: ResolvedWindowRules::default(),
}
}
@@ -251,8 +253,7 @@ impl LayoutElement for TestWindow {
fn refresh(&self) {}
fn rules(&self) -> &ResolvedWindowRules {
static EMPTY: ResolvedWindowRules = ResolvedWindowRules::empty();
&EMPTY
&self.rules
}
fn take_animation_snapshot(&mut self) -> Option<LayoutElementRenderSnapshot> {