@@ -27,11 +27,7 @@ impl PartialEq for MigrationTableRow {
2727 }
2828}
2929
30- fn make_migration_table_row (
31- table : & MigrationTable ,
32- pos : tsk_id_t ,
33- decode_metadata : bool ,
34- ) -> Option < MigrationTableRow > {
30+ fn make_migration_table_row ( table : & MigrationTable , pos : tsk_id_t ) -> Option < MigrationTableRow > {
3531 if pos < table. num_rows ( ) as tsk_id_t {
3632 Some ( MigrationTableRow {
3733 id : pos,
@@ -41,7 +37,7 @@ fn make_migration_table_row(
4137 source : table. source ( pos) . unwrap ( ) ,
4238 dest : table. dest ( pos) . unwrap ( ) ,
4339 time : table. time ( pos) . unwrap ( ) ,
44- metadata : table_row_decode_metadata ! ( decode_metadata , table, pos) ,
40+ metadata : table_row_decode_metadata ! ( table, pos) ,
4541 } )
4642 } else {
4743 None
@@ -56,7 +52,7 @@ impl<'a> Iterator for MigrationTableRefIterator<'a> {
5652 type Item = MigrationTableRow ;
5753
5854 fn next ( & mut self ) -> Option < Self :: Item > {
59- let rv = make_migration_table_row ( self . table , self . pos , self . decode_metadata ) ;
55+ let rv = make_migration_table_row ( self . table , self . pos ) ;
6056 self . pos += 1 ;
6157 rv
6258 }
@@ -66,7 +62,7 @@ impl<'a> Iterator for MigrationTableIterator<'a> {
6662 type Item = crate :: migration_table:: MigrationTableRow ;
6763
6864 fn next ( & mut self ) -> Option < Self :: Item > {
69- let rv = make_migration_table_row ( & self . table , self . pos , self . decode_metadata ) ;
65+ let rv = make_migration_table_row ( & self . table , self . pos ) ;
7066 self . pos += 1 ;
7167 rv
7268 }
@@ -160,32 +156,20 @@ impl<'a> MigrationTable<'a> {
160156
161157 /// Return an iterator over rows of the table.
162158 /// The value of the iterator is [`MigrationTableRow`].
163- ///
164- /// # Parameters
165- ///
166- /// * `decode_metadata`: if `true`, then a *copy* of row metadata
167- /// will be provided in [`MigrationTableRow::metadata`].
168- /// The meta data are *not* decoded.
169- /// Rows with no metadata will contain the value `None`.
170- ///
171- pub fn iter ( & self , decode_metadata : bool ) -> MigrationTableRefIterator {
172- crate :: table_iterator:: make_table_iterator :: < & MigrationTable < ' a > > ( & self , decode_metadata)
159+ pub fn iter ( & self ) -> MigrationTableRefIterator {
160+ crate :: table_iterator:: make_table_iterator :: < & MigrationTable < ' a > > ( & self )
173161 }
174162
175163 /// Return row `r` of the table.
176164 ///
177165 /// # Parameters
178166 ///
179167 /// * `r`: the row id.
180- /// * `decode_metadata`: if `true`, then a *copy* of row metadata
181- /// will be provided in [`MigrationTableRow::metadata`].
182- /// The meta data are *not* decoded.
183- /// Rows with no metadata will contain the value `None`.
184168 ///
185169 /// # Errors
186170 ///
187171 /// [`TskitError::IndexError`] if `r` is out of range.
188- pub fn row ( & self , r : tsk_id_t , decode_metadata : bool ) -> Result < MigrationTableRow , TskitError > {
189- table_row_access ! ( r, decode_metadata , self , make_migration_table_row)
172+ pub fn row ( & self , r : tsk_id_t ) -> Result < MigrationTableRow , TskitError > {
173+ table_row_access ! ( r, self , make_migration_table_row)
190174 }
191175}
0 commit comments