summaryrefslogtreecommitdiffstats
path: root/src/sandbox.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-25 14:17:13 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-25 14:17:13 +0100
commitd70021fa68b556e20638f29e2e303f6d156afdb6 (patch)
treeddc0f00151b1ec71610e60045812493153788632 /src/sandbox.rs
parente72b5ceeb8c6461a34e85909a48debf46505d00a (diff)
downloadiced-d70021fa68b556e20638f29e2e303f6d156afdb6.tar.gz
iced-d70021fa68b556e20638f29e2e303f6d156afdb6.tar.bz2
iced-d70021fa68b556e20638f29e2e303f6d156afdb6.zip
Allow `Application` configuration with `Settings`
Diffstat (limited to 'src/sandbox.rs')
-rw-r--r--src/sandbox.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sandbox.rs b/src/sandbox.rs
index 60e3be14..acf7f5e0 100644
--- a/src/sandbox.rs
+++ b/src/sandbox.rs
@@ -1,4 +1,4 @@
-use crate::{Application, Command, Element};
+use crate::{Application, Command, Element, Settings};
/// A sandboxed [`Application`].
///
@@ -19,10 +19,10 @@ use crate::{Application, Command, Element};
/// to remove the use of [`Command`]:
///
/// ```no_run
-/// use iced::{button, Button, Column, Element, Sandbox, Text};
+/// use iced::{button, Button, Column, Element, Sandbox, Settings, Text};
///
/// pub fn main() {
-/// Counter::run()
+/// Counter::run(Settings::default())
/// }
///
/// #[derive(Default)]
@@ -121,11 +121,11 @@ pub trait Sandbox {
/// It should probably be that last thing you call in your `main` function.
///
/// [`Sandbox`]: trait.Sandbox.html
- fn run()
+ fn run(settings: Settings)
where
Self: 'static + Sized,
{
- <Self as Application>::run()
+ <Self as Application>::run(settings)
}
}