Skip to main content

detect_cycle

Function detect_cycle 

Source
pub fn detect_cycle(
    index: &Index,
    from_id: &str,
    to_id: &str,
) -> Result<bool, Error>
Expand description

Detect a cycle in the dependency graph.

Uses DFS from to_id to check if from_id is reachable. If so, adding the edge from_id -> to_id would create a cycle.