summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-18 19:15:25 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-18 19:15:25 +0100
commitf409037c0766016a9bd22abde5da14406e74959a (patch)
tree350205feb0273fc6b73da66c4cae47030aec1dcb /src
parente8483f0f0ba5d7883476f4f96c66e953f941a823 (diff)
downloadiced-f409037c0766016a9bd22abde5da14406e74959a.tar.gz
iced-f409037c0766016a9bd22abde5da14406e74959a.tar.bz2
iced-f409037c0766016a9bd22abde5da14406e74959a.zip
Simplify message names in overview docs
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 49447418..0e9566e2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -63,8 +63,8 @@
//! ```
//! #[derive(Debug, Clone, Copy)]
//! pub enum Message {
-//! IncrementPressed,
-//! DecrementPressed,
+//! Increment,
+//! Decrement,
//! }
//! ```
//!
@@ -79,8 +79,8 @@
//! #
//! # #[derive(Debug, Clone, Copy)]
//! # pub enum Message {
-//! # IncrementPressed,
-//! # DecrementPressed,
+//! # Increment,
+//! # Decrement,
//! # }
//! #
//! use iced::widget::{button, column, text, Column};
@@ -90,15 +90,15 @@
//! // We use a column: a simple vertical layout
//! column![
//! // The increment button. We tell it to produce an
-//! // `IncrementPressed` message when pressed
-//! button("+").on_press(Message::IncrementPressed),
+//! // `Increment` message when pressed
+//! button("+").on_press(Message::Increment),
//!
//! // We show the value of the counter here
//! text(self.value).size(50),
//!
//! // The decrement button. We tell it to produce a
-//! // `DecrementPressed` message when pressed
-//! button("-").on_press(Message::DecrementPressed),
+//! // `Decrement` message when pressed
+//! button("-").on_press(Message::Decrement),
//! ]
//! }
//! }
@@ -115,18 +115,18 @@
//! #
//! # #[derive(Debug, Clone, Copy)]
//! # pub enum Message {
-//! # IncrementPressed,
-//! # DecrementPressed,
+//! # Increment,
+//! # Decrement,
//! # }
//! impl Counter {
//! // ...
//!
//! pub fn update(&mut self, message: Message) {
//! match message {
-//! Message::IncrementPressed => {
+//! Message::Increment => {
//! self.value += 1;
//! }
-//! Message::DecrementPressed => {
+//! Message::Decrement => {
//! self.value -= 1;
//! }
//! }