Allow pure widgets to borrow from Application data 🎉

This commit is contained in:
Héctor Ramón Jiménez 2022-02-11 22:07:21 +07:00
parent 43a7ad72ef
commit 01c5004959
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
11 changed files with 103 additions and 98 deletions

View file

@ -32,7 +32,7 @@ pub trait Sandbox {
/// Returns the widgets to display in the [`Sandbox`].
///
/// These widgets can produce __messages__ based on user interaction.
fn view(&self) -> pure::Element<Self::Message>;
fn view(&self) -> pure::Element<'_, Self::Message>;
/// Returns the background color of the [`Sandbox`].
///
@ -101,7 +101,7 @@ where
Subscription::none()
}
fn view(&self) -> pure::Element<T::Message> {
fn view(&self) -> pure::Element<'_, T::Message> {
T::view(self)
}