@@ -135,7 +135,7 @@ pub(crate) struct CheckGraphResults<V> {
135135 /// Pairs of nodes that have a path connecting them.
136136 pub ( crate ) connected : HashSet < ( V , V ) > ,
137137 /// Pairs of nodes that don't have a path connecting them.
138- pub ( crate ) disconnected : HashSet < ( V , V ) > ,
138+ pub ( crate ) disconnected : Vec < ( V , V ) > ,
139139 /// Edges that are redundant because a longer path exists.
140140 pub ( crate ) transitive_edges : Vec < ( V , V ) > ,
141141 /// Variant of the graph with no transitive edges.
@@ -151,7 +151,7 @@ impl<V: NodeTrait + Debug> Default for CheckGraphResults<V> {
151151 Self {
152152 reachable : FixedBitSet :: new ( ) ,
153153 connected : HashSet :: new ( ) ,
154- disconnected : HashSet :: new ( ) ,
154+ disconnected : Vec :: new ( ) ,
155155 transitive_edges : Vec :: new ( ) ,
156156 transitive_reduction : DiGraphMap :: new ( ) ,
157157 transitive_closure : DiGraphMap :: new ( ) ,
@@ -198,7 +198,7 @@ where
198198
199199 let mut reachable = FixedBitSet :: with_capacity ( n * n) ;
200200 let mut connected = HashSet :: new ( ) ;
201- let mut disconnected = HashSet :: new ( ) ;
201+ let mut disconnected = Vec :: new ( ) ;
202202
203203 let mut transitive_edges = Vec :: new ( ) ;
204204 let mut transitive_reduction = DiGraphMap :: < V , ( ) > :: new ( ) ;
@@ -255,7 +255,7 @@ where
255255 if reachable[ index] {
256256 connected. insert ( pair) ;
257257 } else {
258- disconnected. insert ( pair) ;
258+ disconnected. push ( pair) ;
259259 }
260260 }
261261 }
0 commit comments