From c4c5216e3b69d732b0518d510f95675a4ba7010b Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 30 Mar 2020 18:00:15 +0200 Subject: Allow passing external state to `Application::new` --- examples/todos/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/todos/src') diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index 7e866b19..c9cbcc69 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -40,8 +40,9 @@ enum Message { impl Application for Todos { type Executor = iced::executor::Default; type Message = Message; + type Flags = (); - fn new() -> (Todos, Command) { + fn new(_flags: ()) -> (Todos, Command) { ( Todos::Loading, Command::perform(SavedState::load(), Message::Loaded), -- cgit