diff options
| author | 2024-08-08 01:25:00 +0200 | |
|---|---|---|
| committer | 2024-08-08 01:25:00 +0200 | |
| commit | 422568dee49fa6b814ae0131a3f88d4ae2be243b (patch) | |
| tree | 39e458a2dd545b90f81d3066c29a74ec27dec505 /runtime | |
| parent | d5ffe98ce939990e6c8ef6f40895cd1f9633fe18 (diff) | |
| download | iced-422568dee49fa6b814ae0131a3f88d4ae2be243b.tar.gz iced-422568dee49fa6b814ae0131a3f88d4ae2be243b.tar.bz2 iced-422568dee49fa6b814ae0131a3f88d4ae2be243b.zip  | |
Introduce `black_box` and `chain` in `widget::operation`
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/src/lib.rs | 4 | ||||
| -rw-r--r-- | runtime/src/multi_window/state.rs | 2 | ||||
| -rw-r--r-- | runtime/src/overlay/nested.rs | 4 | ||||
| -rw-r--r-- | runtime/src/program/state.rs | 2 | ||||
| -rw-r--r-- | runtime/src/user_interface.rs | 2 | 
5 files changed, 7 insertions, 7 deletions
diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index f27657d1..7230fc73 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -59,7 +59,7 @@ pub enum Action<T> {      },      /// Run a widget operation. -    Widget(Box<dyn widget::Operation<()>>), +    Widget(Box<dyn widget::Operation>),      /// Run a clipboard action.      Clipboard(clipboard::Action), @@ -79,7 +79,7 @@ pub enum Action<T> {  impl<T> Action<T> {      /// Creates a new [`Action::Widget`] with the given [`widget::Operation`]. -    pub fn widget(operation: impl widget::Operation<()> + 'static) -> Self { +    pub fn widget(operation: impl widget::Operation + 'static) -> Self {          Self::Widget(Box::new(operation))      } diff --git a/runtime/src/multi_window/state.rs b/runtime/src/multi_window/state.rs index 72ce6933..0bec555f 100644 --- a/runtime/src/multi_window/state.rs +++ b/runtime/src/multi_window/state.rs @@ -205,7 +205,7 @@ where      pub fn operate(          &mut self,          renderer: &mut P::Renderer, -        operations: impl Iterator<Item = Box<dyn Operation<()>>>, +        operations: impl Iterator<Item = Box<dyn Operation>>,          bounds: Size,          debug: &mut Debug,      ) { diff --git a/runtime/src/overlay/nested.rs b/runtime/src/overlay/nested.rs index 11eee41c..da3e6929 100644 --- a/runtime/src/overlay/nested.rs +++ b/runtime/src/overlay/nested.rs @@ -131,13 +131,13 @@ where          &mut self,          layout: Layout<'_>,          renderer: &Renderer, -        operation: &mut dyn widget::Operation<()>, +        operation: &mut dyn widget::Operation,      ) {          fn recurse<Message, Theme, Renderer>(              element: &mut overlay::Element<'_, Message, Theme, Renderer>,              layout: Layout<'_>,              renderer: &Renderer, -            operation: &mut dyn widget::Operation<()>, +            operation: &mut dyn widget::Operation,          ) where              Renderer: renderer::Renderer,          { diff --git a/runtime/src/program/state.rs b/runtime/src/program/state.rs index e51ad0cb..c377814a 100644 --- a/runtime/src/program/state.rs +++ b/runtime/src/program/state.rs @@ -178,7 +178,7 @@ where      pub fn operate(          &mut self,          renderer: &mut P::Renderer, -        operations: impl Iterator<Item = Box<dyn Operation<()>>>, +        operations: impl Iterator<Item = Box<dyn Operation>>,          bounds: Size,          debug: &mut Debug,      ) { diff --git a/runtime/src/user_interface.rs b/runtime/src/user_interface.rs index 858b1a2d..11ebb381 100644 --- a/runtime/src/user_interface.rs +++ b/runtime/src/user_interface.rs @@ -566,7 +566,7 @@ where      pub fn operate(          &mut self,          renderer: &Renderer, -        operation: &mut dyn widget::Operation<()>, +        operation: &mut dyn widget::Operation,      ) {          self.root.as_widget().operate(              &mut self.state,  | 
