Allow passing external state to Application::new
This commit is contained in:
parent
6e9ab1cd6f
commit
c4c5216e3b
13 changed files with 103 additions and 60 deletions
|
|
@ -23,8 +23,9 @@ enum Message {
|
|||
impl Application for Clock {
|
||||
type Executor = executor::Default;
|
||||
type Message = Message;
|
||||
type Flags = ();
|
||||
|
||||
fn new() -> (Self, Command<Message>) {
|
||||
fn new(_flags: ()) -> (Self, Command<Message>) {
|
||||
(
|
||||
Clock {
|
||||
now: chrono::Local::now().into(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue