Skip to content

Commit 067d9d0

Browse files
fubhymattiamanzati
authored andcommitted
backport graph module changes (#5660)
Co-authored-by: Mattia Manzati <[email protected]>
1 parent 7c6dac4 commit 067d9d0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.changeset/good-regions-care.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"effect": minor
3+
---
4+
5+
Backport `Graph` module updates

packages/effect/src/Graph.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,11 +1493,6 @@ export const neighbors = <N, E, T extends Kind = "directed">(
14931493
graph: Graph<N, E, T> | MutableGraph<N, E, T>,
14941494
nodeIndex: NodeIndex
14951495
): Array<NodeIndex> => {
1496-
// For undirected graphs, use the specialized helper that returns the other endpoint
1497-
if (graph.type === "undirected") {
1498-
return getUndirectedNeighbors(graph as any, nodeIndex)
1499-
}
1500-
15011496
const adjacencyList = graph.adjacency.get(nodeIndex)
15021497
if (adjacencyList === undefined) {
15031498
return []

0 commit comments

Comments
 (0)