From 950bfc07d4b71016bf3e9d53709395e185420cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Sun, 14 Jul 2024 22:58:30 +0200 Subject: [PATCH] Export `operate` constructor in `advanced::widget` --- src/advanced.rs | 22 ++++++++++++++-------- src/application.rs | 1 - 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/advanced.rs b/src/advanced.rs index b817bbf9ca..57e40de6ec 100644 --- a/src/advanced.rs +++ b/src/advanced.rs @@ -1,4 +1,17 @@ //! Leverage advanced concepts like custom widgets. +pub mod subscription { + //! Write your own subscriptions. + pub use crate::runtime::futures::subscription::{ + from_recipe, into_recipes, EventStream, Hasher, Recipe, + }; +} + +pub mod widget { + //! Create custom widgets and operate on them. + pub use crate::core::widget::*; + pub use crate::runtime::task::widget as operate; +} + pub use crate::core::clipboard::{self, Clipboard}; pub use crate::core::image; pub use crate::core::layout::{self, Layout}; @@ -7,13 +20,6 @@ pub use crate::core::overlay::{self, Overlay}; pub use crate::core::renderer::{self, Renderer}; pub use crate::core::svg; pub use crate::core::text::{self, Text}; -pub use crate::core::widget::{self, Widget}; pub use crate::core::Shell; pub use crate::renderer::graphics; - -pub mod subscription { - //! Write your own subscriptions. - pub use crate::runtime::futures::subscription::{ - from_recipe, into_recipes, EventStream, Hasher, Recipe, - }; -} +pub use widget::Widget; diff --git a/src/application.rs b/src/application.rs index 71cb6a7f03..c21f343a4e 100644 --- a/src/application.rs +++ b/src/application.rs @@ -423,7 +423,6 @@ impl Update for () { _state: &mut State, _message: Message, ) -> impl Into> { - () } }