summaryrefslogtreecommitdiffstats
path: root/examples/toast/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/toast/src/main.rs')
-rw-r--r--examples/toast/src/main.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/toast/src/main.rs b/examples/toast/src/main.rs
index 42f6c348..47b272a9 100644
--- a/examples/toast/src/main.rs
+++ b/examples/toast/src/main.rs
@@ -1,10 +1,12 @@
+use iced::event::{self, Event};
use iced::executor;
use iced::keyboard;
-use iced::subscription::{self, Subscription};
use iced::widget::{
self, button, column, container, pick_list, row, slider, text, text_input,
};
-use iced::{Alignment, Application, Command, Element, Event, Length, Settings};
+use iced::{
+ Alignment, Application, Command, Element, Length, Settings, Subscription,
+};
use toast::{Status, Toast};
@@ -57,7 +59,7 @@ impl Application for App {
}
fn subscription(&self) -> Subscription<Self::Message> {
- subscription::events().map(Message::Event)
+ event::listen().map(Message::Event)
}
fn update(&mut self, message: Message) -> Command<Message> {