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:
parent
be39c05325
commit
63de1f090a
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue