Make Widget::diff mutable
This commit is contained in:
parent
31bc6d48cd
commit
497ebcd0c3
31 changed files with 114 additions and 81 deletions
|
|
@ -378,7 +378,7 @@ where
|
|||
self.contents.iter().map(Content::state).collect()
|
||||
}
|
||||
|
||||
fn diff(&self, tree: &mut Tree) {
|
||||
fn diff(&mut self, tree: &mut Tree) {
|
||||
let Memory { order, .. } = tree.state.downcast_ref();
|
||||
|
||||
// `Pane` always increments and is iterated by Ord so new
|
||||
|
|
@ -401,7 +401,7 @@ where
|
|||
});
|
||||
|
||||
tree.diff_children_custom(
|
||||
&self.contents,
|
||||
&mut self.contents,
|
||||
|state, content| content.diff(state),
|
||||
Content::state,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue