Introduce black_box and chain in widget::operation

This commit is contained in:
Héctor Ramón Jiménez 2024-08-08 01:25:00 +02:00
parent d5ffe98ce9
commit 422568dee4
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
31 changed files with 232 additions and 67 deletions

View file

@ -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))
}