Revert "Make Widget::diff mutable"

This reverts commit 497ebcd0c3.
This commit is contained in:
Héctor Ramón Jiménez 2025-08-29 04:21:43 +02:00
parent caeb9ce49c
commit 6be707267e
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
31 changed files with 83 additions and 121 deletions

View file

@ -91,13 +91,13 @@ where
}
}
pub(super) fn diff(&mut self, tree: &mut Tree) {
pub(super) fn diff(&self, tree: &mut Tree) {
if tree.children.len() == 2 {
if let Some(title_bar) = self.title_bar.as_mut() {
if let Some(title_bar) = self.title_bar.as_ref() {
title_bar.diff(&mut tree.children[1]);
}
tree.children[0].diff(&mut self.body);
tree.children[0].diff(&self.body);
} else {
*tree = self.state();
}