@@ -73,12 +73,12 @@ impl IteratorOutput {
73
73
where
74
74
T : TableIteration ,
75
75
{
76
- let edges = iterator. edges ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
77
- let nodes = iterator. nodes ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
78
- let sites = iterator. sites ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
79
- let mutations = iterator. mutations ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
80
- let populations = iterator. populations ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
81
- let migrations = iterator. migrations ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
76
+ let edges = iterator. edges_iter ( ) . collect :: < Vec < _ > > ( ) ;
77
+ let nodes = iterator. nodes_iter ( ) . collect :: < Vec < _ > > ( ) ;
78
+ let sites = iterator. sites_iter ( ) . collect :: < Vec < _ > > ( ) ;
79
+ let mutations = iterator. mutations_iter ( ) . collect :: < Vec < _ > > ( ) ;
80
+ let populations = iterator. populations_iter ( ) . collect :: < Vec < _ > > ( ) ;
81
+ let migrations = iterator. migrations_iter ( ) . collect :: < Vec < _ > > ( ) ;
82
82
Self {
83
83
edges,
84
84
nodes,
@@ -90,12 +90,13 @@ impl IteratorOutput {
90
90
}
91
91
92
92
fn new_from_dyn ( dynamic : & dyn tskit:: ObjectSafeTableIteration ) -> Self {
93
- let edges = dynamic. edges ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
94
- let nodes = dynamic. nodes ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
95
- let sites = dynamic. sites ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
96
- let mutations = dynamic. mutations ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
97
- let populations = dynamic. populations ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
98
- let migrations = dynamic. migrations ( ) . iter ( ) . collect :: < Vec < _ > > ( ) ;
93
+ let edges_iter: Box < dyn Iterator < Item = tskit:: EdgeTableRow > + ' _ > = dynamic. edges_iter ( ) ;
94
+ let edges = edges_iter. collect :: < Vec < _ > > ( ) ;
95
+ let nodes = dynamic. nodes_iter ( ) . collect :: < Vec < _ > > ( ) ;
96
+ let sites = dynamic. sites_iter ( ) . collect :: < Vec < _ > > ( ) ;
97
+ let mutations = dynamic. mutations_iter ( ) . collect :: < Vec < _ > > ( ) ;
98
+ let populations = dynamic. populations_iter ( ) . collect :: < Vec < _ > > ( ) ;
99
+ let migrations = dynamic. migrations_iter ( ) . collect :: < Vec < _ > > ( ) ;
99
100
Self {
100
101
edges,
101
102
nodes,
0 commit comments