From f67785edb52f5398eae3a703e116871375198c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Thu, 24 Apr 2025 22:58:17 +0200 Subject: [PATCH] Simplify `Widget::diff` default implementation --- core/src/widget.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/widget.rs b/core/src/widget.rs index 04107482..807b14ac 100644 --- a/core/src/widget.rs +++ b/core/src/widget.rs @@ -97,7 +97,7 @@ where /// Reconciles the [`Widget`] with the provided [`Tree`]. fn diff(&self, tree: &mut Tree) { - tree.diff_children(&[] as &[&dyn Widget]); + tree.children.clear(); } /// Applies an [`Operation`] to the [`Widget`].