Skip to main content

dependency_creates_cycle

Function dependency_creates_cycle 

Source
pub fn dependency_creates_cycle(
    items: &[BacklogItem],
    item: &ItemId,
    dep: &ItemId,
) -> bool
Expand description

Return whether adding dependency dep to item would create a cycle.

Follow dep’s transitive dependencies until item is reached. Dependency cycles are warnings rather than errors; the visited set ensures traversal terminates even when the existing graph already contains a cycle.