@@ -126,12 +126,14 @@ impl Branch {
126126 }
127127 } ;
128128
129- connection. append ( edges. iter ( ) . map ( |( h, chain_length) | {
130- Edge :: new (
131- IndexCursor :: from ( u32:: from ( * chain_length) ) ,
132- Block :: from_valid_hash ( * h) ,
133- )
134- } ) ) ;
129+ connection
130+ . edges
131+ . extend ( edges. iter ( ) . map ( |( h, chain_length) | {
132+ Edge :: new (
133+ IndexCursor :: from ( u32:: from ( * chain_length) ) ,
134+ Block :: from_valid_hash ( * h) ,
135+ )
136+ } ) ) ;
135137
136138 Ok :: < _ , async_graphql:: Error > ( connection)
137139 } ,
@@ -201,7 +203,7 @@ impl Branch {
201203 . collect ( ) ,
202204 } ;
203205
204- connection. append ( edges. iter ( ) . map ( |( h, i) | {
206+ connection. edges . extend ( edges. iter ( ) . map ( |( h, i) | {
205207 Edge :: new ( IndexCursor :: from ( * i) , Transaction :: from_valid_id ( * h) )
206208 } ) ) ;
207209
@@ -279,7 +281,7 @@ impl Branch {
279281 }
280282 } ;
281283
282- connection. append (
284+ connection. edges . extend (
283285 edges
284286 . iter ( )
285287 . map ( |( vps, cursor) | Edge :: new ( IndexCursor :: from ( * cursor) , vps. clone ( ) ) ) ,
@@ -365,7 +367,7 @@ impl Branch {
365367 }
366368 } ;
367369
368- connection. append (
370+ connection. edges . extend (
369371 edges
370372 . iter ( )
371373 . map ( |( pool, cursor) | Edge :: new ( IndexCursor :: from ( * cursor) , pool. clone ( ) ) ) ,
@@ -456,7 +458,7 @@ impl Branch {
456458 . collect :: < Vec < _ > > ( ) ,
457459 } ;
458460
459- connection. append ( edges. iter ( ) . map ( |( id, cursor) | {
461+ connection. edges . extend ( edges. iter ( ) . map ( |( id, cursor) | {
460462 Edge :: new ( IndexCursor :: from ( * cursor) , Block :: from_valid_hash ( * id) )
461463 } ) ) ;
462464
@@ -623,7 +625,7 @@ impl Block {
623625 }
624626 } ;
625627
626- connection. append (
628+ connection. edges . extend (
627629 edges
628630 . iter ( )
629631 . map ( |( tx, cursor) | Edge :: new ( IndexCursor :: from ( * cursor) , tx. clone ( ) ) ) ,
@@ -1103,7 +1105,7 @@ impl Pool {
11031105 } ,
11041106 ) ;
11051107
1106- connection. append (
1108+ connection. edges . extend (
11071109 edges
11081110 . iter ( )
11091111 . map ( |( h, i) | Edge :: new ( IndexCursor :: from ( * i) , Block :: from_valid_hash ( * h) ) ) ,
@@ -1468,7 +1470,7 @@ impl VoteProposalStatus {
14681470 }
14691471 } ;
14701472
1471- connection. append (
1473+ connection. edges . extend (
14721474 edges
14731475 . iter ( )
14741476 . map ( |( vs, cursor) | Edge :: new ( IndexCursor :: from ( * cursor) , vs. clone ( ) ) ) ,
0 commit comments