pub fn would_create_cycle(
parent_of: impl Fn(NodeId) -> Option<NodeId>,
dragged: NodeId,
target: NodeId,
) -> boolExpand description
Would attaching dragged under target create a cycle? Walks target’s
ancestry via the parent_of lookup you provide.