summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-08-30 02:59:53 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-08-30 02:59:53 +0200
commit072cdab48903863f8f5ebaea19bd537428197f51 (patch)
tree580fb9effb18d3f9c49e0042d20a270e7adbb3d3 /README.md
parentdc4ce4d3b953aa41ff8d29c35b63c96327a2eb77 (diff)
downloadiced-072cdab48903863f8f5ebaea19bd537428197f51.tar.gz
iced-072cdab48903863f8f5ebaea19bd537428197f51.tar.bz2
iced-072cdab48903863f8f5ebaea19bd537428197f51.zip
Write documentation example for `Element::map`
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index 8a662df6..3578f79b 100644
--- a/README.md
+++ b/README.md
@@ -88,7 +88,7 @@ use iced::{Button, Column, Text};
use iced_wgpu::Renderer; // Iced is renderer-agnostic! We need to bring our own!
impl Counter {
- fn view(&mut self) -> Column<Message, Renderer> {
+ pub fn view(&mut self) -> Column<Message, Renderer> {
// We use a column: a simple vertical layout
Column::new()
.push(
@@ -118,7 +118,7 @@ __state__ accordingly in our __update logic__:
impl Counter {
// ...
- fn update(&mut self, message: Message) {
+ pub fn update(&mut self, message: Message) {
match message {
Message::IncrementPressed => {
self.value += 1;