Allow passing external state to Application::new

This commit is contained in:
Héctor Ramón Jiménez 2020-03-30 18:00:15 +02:00
parent 6e9ab1cd6f
commit c4c5216e3b
13 changed files with 103 additions and 60 deletions

View file

@ -26,8 +26,9 @@ pub enum Message {
impl Application for Example {
type Executor = executor::Default;
type Message = Message;
type Flags = ();
fn new() -> (Example, Command<Message>) {
fn new(_flags: ()) -> (Example, Command<Message>) {
(
Example::Idle {
button: button::State::new(),