ui-contract: CollectionProps::drag_payload takes self by value without mut

This commit is contained in:
bflatastic
2026-11-23 06:58:31 +07:00
parent f846294322
commit e7e9229031
@@ -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))
}