summaryrefslogtreecommitdiffstats
path: root/examples/todos
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-30 18:00:15 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-30 18:10:15 +0200
commitc4c5216e3b69d732b0518d510f95675a4ba7010b (patch)
tree25e14890319bbab46aeb5133ef1c694959b9f694 /examples/todos
parent6e9ab1cd6f5358d323040379e3aadbed2cc4f7f8 (diff)
downloadiced-c4c5216e3b69d732b0518d510f95675a4ba7010b.tar.gz
iced-c4c5216e3b69d732b0518d510f95675a4ba7010b.tar.bz2
iced-c4c5216e3b69d732b0518d510f95675a4ba7010b.zip
Allow passing external state to `Application::new`
Diffstat (limited to 'examples/todos')
-rw-r--r--examples/todos/src/main.rs3
1 files changed, 2 insertions, 1 deletions
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<Message>) {
+ fn new(_flags: ()) -> (Todos, Command<Message>) {
(
Todos::Loading,
Command::perform(SavedState::load(), Message::Loaded),