diff options
author | 2020-02-12 09:21:13 +0100 | |
---|---|---|
committer | 2020-02-12 09:21:13 +0100 | |
commit | 4a24392c9c078c56ea26b49c455c9ef183fa79a6 (patch) | |
tree | 496fbae97cce548992a5f8653f8eee5a51840172 /examples/clock | |
parent | de8f06b512ec65f625417e334dca30990248c968 (diff) | |
download | iced-4a24392c9c078c56ea26b49c455c9ef183fa79a6.tar.gz iced-4a24392c9c078c56ea26b49c455c9ef183fa79a6.tar.bz2 iced-4a24392c9c078c56ea26b49c455c9ef183fa79a6.zip |
Simplify `Clock::new` in `clock` example
Diffstat (limited to 'examples/clock')
-rw-r--r-- | examples/clock/src/main.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs index e70ce91a..e30158f7 100644 --- a/examples/clock/src/main.rs +++ b/examples/clock/src/main.rs @@ -22,11 +22,9 @@ impl Application for Clock { type Message = Message; fn new() -> (Self, Command<Message>) { - let now: LocalTime = chrono::Local::now().into(); - ( Clock { - now, + now: chrono::Local::now().into(), clock: canvas::layer::Cached::new(), }, Command::none(), |