Skip to content

Commit 701b068

Browse files
committed
graphs tools : refactor
1 parent c6a5226 commit 701b068

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

module/move/graphs_tools/tests/inc/graph/map_of_nodes.rs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,28 @@ impl< 'a > Graph< 'a >
9090
// {
9191
//
9292
// // Create nodes
93-
// let mut nodes_darray : Vec< Node > = vec![ 1, 2, 3 ].into_iter().map( | id | Node::new( id ) ).collect();
94-
// let mut node1 = Node::new( 1 );
93+
// let mut node0 = Node::new( 0 );
94+
// let node1 = Node::new( 1 );
9595
// let node2 = Node::new( 2 );
96-
// let node3 = Node::new( 3 );
9796
//
9897
// // Set up the graph structure
99-
// node1
98+
// node0
99+
// .add_child( &node1 )
100100
// .add_child( &node2 )
101-
// .add_child( &node3 )
102101
// ;
103102
//
103+
// let mut nodes_darray = vec![ node0, node1, node2 ];
104+
// let mut result = ( nodes_darray, Self::default() );
105+
//
104106
// let mut graph = Self::default();
105-
// graph.add_node( &node1 );
106-
// graph.add_node( &node2 );
107-
// graph.add_node( &node3 );
107+
// graph.add_node( &result.0[ 0 ] );
108+
// graph.add_node( &result.0[ 1 ] );
109+
// graph.add_node( &result.0[ 2 ] );
110+
// core::mem::swap( &mut result.1, &mut graph );
108111
//
109-
// return ( nodes_darray, graph );
112+
// // return ( Default::default(), Default::default() );
113+
// return result;
114+
// // return ( nodes_darray, graph );
110115
// }
111116

112117
}

0 commit comments

Comments
 (0)