From 90690702e1e4abab804ec91e8ff4183824bec436 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 20 Jan 2020 04:47:36 +0100 Subject: Add `Application::Executor` associated type --- examples/events.rs | 5 +++-- examples/pokedex.rs | 1 + examples/stopwatch.rs | 1 + examples/todos.rs | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/events.rs b/examples/events.rs index 74542171..0c9dca05 100644 --- a/examples/events.rs +++ b/examples/events.rs @@ -1,6 +1,6 @@ use iced::{ - Align, Application, Checkbox, Column, Command, Container, Element, Length, - Settings, Subscription, Text, + executor, Align, Application, Checkbox, Column, Command, Container, + Element, Length, Settings, Subscription, Text, }; pub fn main() { @@ -20,6 +20,7 @@ enum Message { } impl Application for Events { + type Executor = executor::Default; type Message = Message; fn new() -> (Events, Command) { diff --git a/examples/pokedex.rs b/examples/pokedex.rs index 7326f94f..505dbf19 100644 --- a/examples/pokedex.rs +++ b/examples/pokedex.rs @@ -27,6 +27,7 @@ enum Message { } impl Application for Pokedex { + type Executor = iced_futures::executor::AsyncStd; type Message = Message; fn new() -> (Pokedex, Command) { diff --git a/examples/stopwatch.rs b/examples/stopwatch.rs index 2bc85c4d..6e357039 100644 --- a/examples/stopwatch.rs +++ b/examples/stopwatch.rs @@ -28,6 +28,7 @@ enum Message { } impl Application for Stopwatch { + type Executor = iced_futures::executor::AsyncStd; type Message = Message; fn new() -> (Stopwatch, Command) { diff --git a/examples/todos.rs b/examples/todos.rs index 4166f75a..06595a1e 100644 --- a/examples/todos.rs +++ b/examples/todos.rs @@ -38,6 +38,7 @@ enum Message { } impl Application for Todos { + type Executor = iced_futures::executor::AsyncStd; type Message = Message; fn new() -> (Todos, Command) { -- cgit