From bd22cc0bc0f7551d29cf2acd22520f4a906f253c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 12 Feb 2022 17:21:28 +0700 Subject: Implement pure version of `todos` example :tada: The `Widget` trait in `iced_pure` needed to change a bit to make the implementation of `Element::map` possible. Specifically, the `children` method has been split into `diff` and `children_state`. --- pure/src/widget/text.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pure/src/widget/text.rs') diff --git a/pure/src/widget/text.rs b/pure/src/widget/text.rs index f437b48b..8f157ea0 100644 --- a/pure/src/widget/text.rs +++ b/pure/src/widget/text.rs @@ -21,8 +21,10 @@ where Box::new(()) } - fn children(&self) -> &[Element] { - &[] + fn diff(&self, _tree: &mut Tree) {} + + fn children_state(&self) -> Vec { + Vec::new() } fn width(&self) -> Length { -- cgit