mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 00:57:26 +00:00
ui-contract: CollectionProps::drag_payload takes self by value without mut
This commit is contained in:
@@ -369,7 +369,7 @@ impl CollectionProps {
|
||||
/// A row drag carries `map` of it, for the drop targets of type `P`; a row the map gives `None` for does not drag
|
||||
/// unless a reorder rule is set. The drag stays one session with one ghost.
|
||||
#[must_use]
|
||||
pub fn drag_payload<K: 'static, P: Send + Sync + 'static>(mut self, map: impl Fn(&ListDrag<K>) -> Option<P> + Send + Sync + 'static) -> Self {
|
||||
pub fn drag_payload<K: 'static, P: Send + Sync + 'static>(self, map: impl Fn(&ListDrag<K>) -> Option<P> + Send + Sync + 'static) -> Self {
|
||||
self.carry(DragPayload::new(map))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user