summaryrefslogtreecommitdiffstats
path: root/src/sandbox.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-30 18:00:15 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-30 18:10:15 +0200
commitc4c5216e3b69d732b0518d510f95675a4ba7010b (patch)
tree25e14890319bbab46aeb5133ef1c694959b9f694 /src/sandbox.rs
parent6e9ab1cd6f5358d323040379e3aadbed2cc4f7f8 (diff)
downloadiced-c4c5216e3b69d732b0518d510f95675a4ba7010b.tar.gz
iced-c4c5216e3b69d732b0518d510f95675a4ba7010b.tar.bz2
iced-c4c5216e3b69d732b0518d510f95675a4ba7010b.zip
Allow passing external state to `Application::new`
Diffstat (limited to 'src/sandbox.rs')
-rw-r--r--src/sandbox.rs5
1 files changed, 3 insertions, 2 deletions
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<T::Message>) {
+ fn new(_flags: ()) -> (Self, Command<T::Message>) {
(T::new(), Command::none())
}