MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / graph

Function graph

atomic-repository/src/repository/dependency_closure.rs:80–85  ·  view source on GitHub ↗
(edges: &[(u32, &[u32])])

Source from the content-addressed store, hash-verified

78 use std::collections::HashMap;
79
80 fn graph(edges: &[(u32, &[u32])]) -> HashMap<u32, Vec<u32>> {
81 edges
82 .iter()
83 .map(|(node, deps)| (*node, deps.to_vec()))
84 .collect()
85 }
86
87 #[test]
88 fn a_chain_depends_transitively_in_one_direction() {

Calls 2

collectMethod · 0.45
iterMethod · 0.45