Simplify Widget::diff default implementation

This commit is contained in:
Héctor Ramón Jiménez 2025-04-24 22:58:17 +02:00
parent 6034a0cf60
commit f67785edb5
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -97,7 +97,7 @@ where
/// Reconciles the [`Widget`] with the provided [`Tree`].
fn diff(&self, tree: &mut Tree) {
tree.diff_children(&[] as &[&dyn Widget<Message, Theme, Renderer>]);
tree.children.clear();
}
/// Applies an [`Operation`] to the [`Widget`].