File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1131,15 +1131,15 @@ pub(in crate::hugr::patch) mod test {
11311131
11321132 // 1. Locate the CX in h
11331133 let h_node_cx: Node = h
1134- . nodes ( )
1134+ . entry_descendants ( )
11351135 . find ( |node : & Node | * h. get_optype ( * node) == cx_gate ( ) . into ( ) )
11361136 . unwrap ( ) ;
11371137 let s = vec ! [ h_node_cx] ;
11381138 // 2. Construct a new DFG-rooted hugr for the replacement
11391139 let n: Hugr = dfg_hugr2;
11401140 // 3. Construct the input and output matchings
11411141 // 3.1. Locate the Output and its predecessor H in n
1142- let [ _n_node_input, n_node_output] = n. get_io ( n. root ( ) ) . unwrap ( ) ;
1142+ let [ _n_node_input, n_node_output] = n. get_io ( n. entrypoint ( ) ) . unwrap ( ) ;
11431143 let n_node_h = n. input_neighbours ( n_node_output) . nth ( 1 ) . unwrap ( ) ;
11441144 // 3.2. Locate the ports we need to specify as "glue" in n
11451145 let ( n_port_0, n_port_1) = n
@@ -1176,7 +1176,7 @@ pub(in crate::hugr::patch) mod test {
11761176
11771177 #[ rstest]
11781178 fn test_output_boundary_map ( dfg_hugr2 : Hugr ) {
1179- let [ inp, out] = dfg_hugr2. get_io ( dfg_hugr2. root ( ) ) . unwrap ( ) ;
1179+ let [ inp, out] = dfg_hugr2. get_io ( dfg_hugr2. entrypoint ( ) ) . unwrap ( ) ;
11801180 let map = [
11811181 ( ( inp, OutgoingPort :: from ( 0 ) ) , IncomingPort :: from ( 0 ) ) ,
11821182 ( ( inp, OutgoingPort :: from ( 1 ) ) , IncomingPort :: from ( 1 ) ) ,
You can’t perform that action at this time.
0 commit comments