Skip to content

Commit 2f99e90

Browse files
committed
fix: derive Debug for all table row types
1 parent 3f2d7a9 commit 2f99e90

File tree

8 files changed

+8
-2
lines changed

8 files changed

+8
-2
lines changed

src/edge_table.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use crate::{EdgeId, NodeId};
66
use ll_bindings::{tsk_edge_table_free, tsk_edge_table_init};
77

88
/// Row of an [`EdgeTable`]
9+
#[derive(Debug)]
910
pub struct EdgeTableRow {
1011
pub id: EdgeId,
1112
pub left: Position,

src/individual_table.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use crate::{tsk_id_t, tsk_size_t, TskitError};
77
use ll_bindings::{tsk_individual_table_free, tsk_individual_table_init};
88

99
/// Row of a [`IndividualTable`]
10+
#[derive(Debug)]
1011
pub struct IndividualTableRow {
1112
pub id: IndividualId,
1213
pub flags: IndividualFlags,

src/migration_table.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use crate::{MigrationId, NodeId, PopulationId};
88
use ll_bindings::{tsk_migration_table_free, tsk_migration_table_init};
99

1010
/// Row of a [`MigrationTable`]
11+
#[derive(Debug)]
1112
pub struct MigrationTableRow {
1213
pub id: MigrationId,
1314
pub left: Position,

src/mutation_table.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use crate::{MutationId, NodeId, SiteId};
77
use ll_bindings::{tsk_mutation_table_free, tsk_mutation_table_init};
88

99
/// Row of a [`MutationTable`]
10+
#[derive(Debug)]
1011
pub struct MutationTableRow {
1112
pub id: MutationId,
1213
pub site: SiteId,

src/node_table.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use crate::{IndividualId, NodeId, PopulationId};
88
use ll_bindings::{tsk_node_table_free, tsk_node_table_init};
99

1010
/// Row of a [`NodeTable`]
11+
#[derive(Debug)]
1112
pub struct NodeTableRow {
1213
pub id: NodeId,
1314
pub time: Time,

src/population_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::TskitError;
77
use ll_bindings::{tsk_population_table_free, tsk_population_table_init};
88

99
/// Row of a [`PopulationTable`]
10-
#[derive(Eq)]
10+
#[derive(Eq, Debug)]
1111
pub struct PopulationTableRow {
1212
pub id: PopulationId,
1313
pub metadata: Option<Vec<u8>>,

src/site_table.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use crate::TskitError;
88
use ll_bindings::{tsk_site_table_free, tsk_site_table_init};
99

1010
/// Row of a [`SiteTable`]
11+
#[derive(Debug)]
1112
pub struct SiteTableRow {
1213
pub id: SiteId,
1314
pub position: Position,

tests/test_tables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ mod test_adding_rows_without_metadata {
4545
// are held in an Option.
4646
match tables.$table().row(id) {
4747
Some(row) => {
48-
// assert_eq!(row, row);
48+
assert_eq!(row, row);
4949
assert!(row.metadata.is_none())
5050
},
5151
None => panic!("Expected Some(row) from {} table", stringify!(table))

0 commit comments

Comments
 (0)