Simplify `Clock::new` in `clock` example
This commit is contained in:
parent
de8f06b512
commit
4a24392c9c
|
@ -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(),
|
||||||
|
|
Loading…
Reference in New Issue