Skip to content

Commit

Permalink
style: Deprecate "OwningX" type aliases for tables. (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen authored Feb 1, 2023
1 parent fbe5b2f commit abe8d7d
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/edge_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,4 +441,5 @@ impl Default for EdgeTable {
}
}

#[deprecated(since = "0.13.2", note = "use EdgeTable instead")]
pub type OwningEdgeTable = EdgeTable;
1 change: 1 addition & 0 deletions src/individual_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,4 +568,5 @@ impl Default for IndividualTable {
}
}

#[deprecated(since = "0.13.2", note = "use IndividualTable instead")]
pub type OwningIndividualTable = IndividualTable;
30 changes: 21 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,30 @@ use bindings::tsk_size_t;
pub(crate) const TSK_NULL: tsk_id_t = -1;

pub use edge_differences::*;
pub use edge_table::{EdgeTable, EdgeTableRow, OwningEdgeTable};
#[allow(deprecated)]
pub use edge_table::OwningEdgeTable;
pub use edge_table::{EdgeTable, EdgeTableRow};
pub use error::TskitError;
pub use flags::*;
pub use individual_table::{IndividualTable, IndividualTableRow, OwningIndividualTable};
pub use migration_table::{MigrationTable, MigrationTableRow, OwningMigrationTable};
pub use mutation_table::{MutationTable, MutationTableRow, OwningMutationTable};
#[allow(deprecated)]
pub use individual_table::OwningIndividualTable;
pub use individual_table::{IndividualTable, IndividualTableRow};
#[allow(deprecated)]
pub use migration_table::OwningMigrationTable;
pub use migration_table::{MigrationTable, MigrationTableRow};
#[allow(deprecated)]
pub use mutation_table::OwningMutationTable;
pub use mutation_table::{MutationTable, MutationTableRow};
pub use newtypes::*;
pub use node_table::{
NodeDefaults, NodeDefaultsWithMetadata, NodeTable, NodeTableRow, OwningNodeTable,
};
pub use population_table::{OwningPopulationTable, PopulationTable, PopulationTableRow};
pub use site_table::{OwningSiteTable, SiteTable, SiteTableRow};
#[allow(deprecated)]
pub use node_table::OwningNodeTable;
pub use node_table::{NodeDefaults, NodeDefaultsWithMetadata, NodeTable, NodeTableRow};
#[allow(deprecated)]
pub use population_table::OwningPopulationTable;
pub use population_table::{PopulationTable, PopulationTableRow};
#[allow(deprecated)]
pub use site_table::OwningSiteTable;
pub use site_table::{SiteTable, SiteTableRow};
pub use table_collection::TableCollection;
pub use traits::IndividualLocation;
pub use traits::IndividualParents;
Expand Down
1 change: 1 addition & 0 deletions src/migration_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,4 +509,5 @@ impl Default for MigrationTable {
}
}

#[deprecated(since = "0.13.2", note = "use MigrationTable instead")]
pub type OwningMigrationTable = MigrationTable;
1 change: 1 addition & 0 deletions src/mutation_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,4 +489,5 @@ impl Default for MutationTable {
}
}

#[deprecated(since = "0.13.2", note = "use MutationTable instead")]
pub type OwningMutationTable = MutationTable;
1 change: 1 addition & 0 deletions src/node_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,7 @@ impl NodeTable {
=> population, population_slice_raw, crate::tsk_id_t);
}

#[deprecated(since = "0.13.2", note = "use NodeTable instead")]
pub type OwningNodeTable = NodeTable;

impl Default for NodeTable {
Expand Down
1 change: 1 addition & 0 deletions src/population_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,4 +300,5 @@ impl Default for PopulationTable {
}
}

#[deprecated(since = "0.13.2", note = "use PopulationTable instead")]
pub type OwningPopulationTable = PopulationTable;
1 change: 1 addition & 0 deletions src/provenance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ impl Default for ProvenanceTable {
}
}

#[deprecated(since = "0.13.2", note = "use ProvenanceTable instead")]
pub type OwningProvenanceTable = ProvenanceTable;

#[cfg(test)]
Expand Down
1 change: 1 addition & 0 deletions src/site_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,4 +376,5 @@ impl Default for SiteTable {
}
}

#[deprecated(since = "0.13.2", note = "use SiteTable instead")]
pub type OwningSiteTable = SiteTable;

0 comments on commit abe8d7d

Please sign in to comment.