diff --git a/crates/egui/src/drag_and_drop.rs b/crates/egui/src/drag_and_drop.rs index 2b2972392c48..3692412284bc 100644 --- a/crates/egui/src/drag_and_drop.rs +++ b/crates/egui/src/drag_and_drop.rs @@ -40,9 +40,9 @@ impl DragAndDrop { /// Set a drag-and-drop payload. /// /// This can be read by [`Self::payload`] until the pointer is released. - pub fn set_payload(ctx: &Context, payload: T) + pub fn set_payload(ctx: &Context, payload: Payload) where - T: Any + Send + Sync, + Payload: Any + Send + Sync, { ctx.data_mut(|data| { let state = data.get_temp_mut_or_default::(Id::NULL); @@ -56,9 +56,9 @@ impl DragAndDrop { /// /// Returns `Some` both during a drag and on the frame the pointer is released /// (if there is a payload). - pub fn payload(ctx: &Context) -> Option> + pub fn payload(ctx: &Context) -> Option> where - T: Any + Send + Sync, + Payload: Any + Send + Sync, { ctx.data(|data| { let state = data.get_temp::(Id::NULL)?; @@ -71,11 +71,11 @@ impl DragAndDrop { /// /// Returns `true` both during a drag and on the frame the pointer is released /// (if there is a payload). - pub fn has_payload_of_type(ctx: &Context) -> bool + pub fn has_payload_of_type(ctx: &Context) -> bool where - T: Any + Send + Sync, + Payload: Any + Send + Sync, { - Self::payload::(ctx).is_some() + Self::payload::(ctx).is_some() } /// Are we carrying a payload?