Skip to main content

detect_cycles

Function detect_cycles 

Source
pub fn detect_cycles(specs: &[Spec]) -> Vec<Vec<String>>
Expand description

Detects cycles in the dependency graph.

Returns a list of cycles, where each cycle is represented as a list of spec IDs. If no cycles exist, returns an empty vector.

§Arguments

  • specs - Slice of specs to analyze

§Returns

Vector of cycles, each represented as a vector of spec IDs forming the cycle