From 03d92fd370fe86823c6f62c42ca0755926aadaf1 Mon Sep 17 00:00:00 2001 From: Peter Sonntag Date: Fri, 18 Oct 2024 17:40:57 +0200 Subject: [PATCH] harmonize messages --- examples/simple_manual.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/simple_manual.rs b/examples/simple_manual.rs index a9b6766..100275d 100644 --- a/examples/simple_manual.rs +++ b/examples/simple_manual.rs @@ -11,7 +11,7 @@ struct AppModel { #[derive(Debug)] // ANCHOR: msg -enum AppInput { +enum AppMsg { Increment, Decrement, } @@ -30,7 +30,7 @@ impl SimpleComponent for AppModel { // ANCHOR: constants /// The type of the messages that this component can receive. - type Input = AppInput; + type Input = AppMsg; /// The type of the messages that this component can send. type Output = (); /// The type of data with which this component will be initialized. @@ -102,10 +102,10 @@ impl SimpleComponent for AppModel { // ANCHOR: update_function fn update(&mut self, message: Self::Input, _sender: ComponentSender) { match message { - AppInput::Increment => { + AppMsg::Increment => { self.counter = self.counter.wrapping_add(1); } - AppInput::Decrement => { + AppMsg::Decrement => { self.counter = self.counter.wrapping_sub(1); } }