Simplify `Clock::new` in `clock` example

This commit is contained in:
Héctor Ramón Jiménez 2020-02-12 09:21:13 +01:00
parent de8f06b512
commit 4a24392c9c
1 changed files with 1 additions and 3 deletions

View File

@ -22,11 +22,9 @@ impl Application for Clock {
type Message = Message; type Message = Message;
fn new() -> (Self, Command<Message>) { fn new() -> (Self, Command<Message>) {
let now: LocalTime = chrono::Local::now().into();
( (
Clock { Clock {
now, now: chrono::Local::now().into(),
clock: canvas::layer::Cached::new(), clock: canvas::layer::Cached::new(),
}, },
Command::none(), Command::none(),