From 8bcbad959b187c3f55f0a9f62523d38189da4d99 Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Tue, 2 Jan 2024 14:40:41 -0800 Subject: [PATCH] Regenerating readmes --- .crate-docs.md | 9 +++++---- README.md | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.crate-docs.md b/.crate-docs.md index 29396ae..c7309ad 100644 --- a/.crate-docs.md +++ b/.crate-docs.md @@ -33,11 +33,12 @@ increments its own label: fn main() -> cushy::Result { // Create a dynamic usize. let count = Dynamic::new(0_isize); - // Create a dynamic that contains `count.to_string()` - let count_label = count.map_each(ToString::to_string); - // Create a new button whose text is our dynamic string. - count_label + // Create a new label displaying `count` + count + .clone() + .into_label() + // Use the label as the contents of a button .into_button() // Set the `on_click` callback to a closure that increments the counter. .on_click(move |_| count.set(count.get() + 1)) diff --git a/README.md b/README.md index a141fb2..7dc5eaf 100644 --- a/README.md +++ b/README.md @@ -35,11 +35,12 @@ increments its own label: fn main() -> cushy::Result { // Create a dynamic usize. let count = Dynamic::new(0_isize); - // Create a dynamic that contains `count.to_string()` - let count_label = count.map_each(ToString::to_string); - // Create a new button whose text is our dynamic string. - count_label + // Create a new label displaying `count` + count + .clone() + .into_label() + // Use the label as the contents of a button .into_button() // Set the `on_click` callback to a closure that increments the counter. .on_click(move |_| count.set(count.get() + 1))