From c4c5216e3b69d732b0518d510f95675a4ba7010b Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 30 Mar 2020 18:00:15 +0200 Subject: Allow passing external state to `Application::new` --- src/sandbox.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/sandbox.rs') diff --git a/src/sandbox.rs b/src/sandbox.rs index 2c0332ff..4ea8de98 100644 --- a/src/sandbox.rs +++ b/src/sandbox.rs @@ -121,7 +121,7 @@ pub trait Sandbox { /// It should probably be that last thing you call in your `main` function. /// /// [`Sandbox`]: trait.Sandbox.html - fn run(settings: Settings) + fn run(settings: Settings<()>) where Self: 'static + Sized, { @@ -134,9 +134,10 @@ where T: Sandbox, { type Executor = executor::Null; + type Flags = (); type Message = T::Message; - fn new() -> (Self, Command) { + fn new(_flags: ()) -> (Self, Command) { (T::new(), Command::none()) } -- cgit