1
Fork 0
mirror of https://github.com/RGBCube/dix synced 2025-07-28 12:17:45 +00:00

store: make sure that nodes with no outgoing edges in the graph are in the adj list

This commit is contained in:
Dragyx 2025-05-06 16:33:14 +02:00
parent be39c05325
commit 63de1f090a

View file

@ -104,6 +104,7 @@ pub fn get_dependency_graph(path: &std::path::Path) -> Result<HashMap<i64, Vec<i
for row in queried_sum { for row in queried_sum {
let (from, to) = row?; let (from, to) = row?;
adj.entry(from).or_default().push(to); adj.entry(from).or_default().push(to);
adj.entry(to).or_default();
} }
Ok(adj) Ok(adj)