Make widget::Tree mutable in Widget::layout

This commit is contained in:
Héctor Ramón Jiménez 2023-08-30 06:36:24 +02:00
parent 301e6e5fdc
commit a026e917d3
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
45 changed files with 135 additions and 135 deletions

View file

@ -184,7 +184,7 @@ where
fn layout(
&self,
tree: &Tree,
tree: &mut Tree,
renderer: &Renderer,
limits: &layout::Limits,
) -> layout::Node {
@ -195,7 +195,7 @@ where
|limits| {
let state = tree
.state
.downcast_ref::<widget::text::State<Renderer::Paragraph>>();
.downcast_mut::<widget::text::State<Renderer::Paragraph>>();
widget::text::layout(
state,