Simplify AnyView

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-10-31 16:16:30 +01:00
parent 6a3974ddbb
commit 7b6514b178
5 changed files with 112 additions and 138 deletions

View file

@ -328,7 +328,7 @@ pub trait StatefulInteractive<V: 'static>: StatelessInteractive<V> {
);
self.stateful_interaction().drag_listener =
Some(Box::new(move |view_state, cursor_offset, cx| AnyDrag {
view: listener(view_state, cx).into_any(),
view: listener(view_state, cx).into(),
cursor_offset,
}));
self