WIP

Nathan Sobo created

Change summary

crates/gpui2/src/element.rs     |  2 +-
crates/gpui2/src/interactive.rs | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)

Detailed changes

crates/gpui2/src/element.rs 🔗

@@ -3,7 +3,7 @@ use derive_more::{Deref, DerefMut};
 pub(crate) use smallvec::SmallVec;
 use std::{any::Any, mem};
 
-pub trait Element<V: 'static>: IntoAnyElement<V> {
+pub trait Element<V: 'static> {
     type ElementState: 'static;
 
     fn id(&self) -> Option<ElementId>;

crates/gpui2/src/interactive.rs 🔗

@@ -1,7 +1,7 @@
 use crate::{
     point, px, view, Action, AnyBox, AnyDrag, AppContext, BorrowWindow, Bounds, DispatchContext,
-    DispatchPhase, Element, ElementId, FocusHandle, KeyMatch, Keystroke, Modifiers, Overflow,
-    Pixels, Point, SharedString, Size, Style, StyleRefinement, ViewContext,
+    DispatchPhase, Element, ElementId, FocusHandle, IntoAnyElement, KeyMatch, Keystroke, Modifiers,
+    Overflow, Pixels, Point, SharedString, Size, Style, StyleRefinement, ViewContext,
 };
 use collections::HashMap;
 use derive_more::{Deref, DerefMut};
@@ -327,7 +327,7 @@ pub trait StatefulInteractive<V: 'static>: StatelessInteractive<V> {
         S: Any + Send + Sync,
         R: Fn(&mut V, &mut ViewContext<V>) -> E,
         R: 'static + Send + Sync,
-        E: Element<V>,
+        E: IntoAnyElement<V>,
     {
         debug_assert!(
             self.stateful_interaction().drag_listener.is_none(),
@@ -871,7 +871,7 @@ pub struct Drag<S, R, V, E>
 where
     R: Fn(&mut V, &mut ViewContext<V>) -> E,
     V: 'static,
-    E: Element<V>,
+    E: IntoAnyElement<V>,
 {
     pub state: S,
     pub render_drag_handle: R,
@@ -882,7 +882,7 @@ impl<S, R, V, E> Drag<S, R, V, E>
 where
     R: Fn(&mut V, &mut ViewContext<V>) -> E,
     V: 'static,
-    E: Element<V>,
+    E: IntoAnyElement<V>,
 {
     pub fn new(state: S, render_drag_handle: R) -> Self {
         Drag {