summaryrefslogtreecommitdiffstats
path: root/examples/stopwatch
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/stopwatch
parent6e9ab1cd6f5358d323040379e3aadbed2cc4f7f8 (diff)
downloadiced-c4c5216e3b69d732b0518d510f95675a4ba7010b.tar.gz
iced-c4c5216e3b69d732b0518d510f95675a4ba7010b.tar.bz2
iced-c4c5216e3b69d732b0518d510f95675a4ba7010b.zip
Allow passing external state to `Application::new`
Diffstat (limited to 'examples/stopwatch')
-rw-r--r--examples/stopwatch/src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/stopwatch/src/main.rs b/examples/stopwatch/src/main.rs
index d84c4817..5a54ed2b 100644
--- a/examples/stopwatch/src/main.rs
+++ b/examples/stopwatch/src/main.rs
@@ -30,8 +30,9 @@ enum Message {
impl Application for Stopwatch {
type Executor = iced_futures::executor::AsyncStd;
type Message = Message;
+ type Flags = ();
- fn new() -> (Stopwatch, Command<Message>) {
+ fn new(_flags: ()) -> (Stopwatch, Command<Message>) {
(
Stopwatch {
duration: Duration::default(),