Skip to content

clean up unused test code #414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions src/_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1280,8 +1280,6 @@ macro_rules! delegate_table_view_api {
/// Get all nodes with time > 0.0:
///
/// ```
/// use tskit::bindings::tsk_id_t;
///
/// let mut tables = tskit::TableCollection::new(100.).unwrap();
/// tables
/// .add_node(tskit::TSK_NODE_IS_SAMPLE, 0.0, tskit::PopulationId::NULL,
Expand All @@ -1295,29 +1293,6 @@ macro_rules! delegate_table_view_api {
/// |row: &tskit::NodeTableRow| row.time > 0.,
/// );
/// assert_eq!(samples[0], 1);
///
/// // Get all nodes that have a mutation:
///
/// // fn node_has_mutation(
/// // // dyn trait here means this
/// // // will work with TreeSequence, too.
/// // tables_type: &dyn std::ops::Deref<Target=tskit::table_views::TableViews>,
/// // row: &tskit::NodeTableRow,
/// // ) -> bool {
/// // for mrow in tables_type.mutations_iter() {
/// // if mrow.node == row.id {
/// // return true;
/// // }
/// // }
/// // false
/// // }
///
/// // // Get all nodes that have a mutation:
///
/// // tables.add_mutation(0, 0, tskit::MutationId::NULL, 0.0, None).unwrap();
/// // let samples_with_mut = tables.create_node_id_vector(
/// // |row: &tskit::NodeTableRow| node_has_mutation(&tables, row));
/// // assert_eq!(samples_with_mut[0], 0);
/// ```
pub fn create_node_id_vector(&self, f: impl FnMut(&crate::NodeTableRow) -> bool) -> Vec<crate::NodeId>;
}
Expand Down
26 changes: 0 additions & 26 deletions src/table_views.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ impl TableViews {
/// Get all nodes with time > 0.0:
///
/// ```
/// use tskit::bindings::tsk_id_t;
///
/// let mut tables = tskit::TableCollection::new(100.).unwrap();
/// tables
/// .add_node(tskit::TSK_NODE_IS_SAMPLE, 0.0, tskit::PopulationId::NULL,
Expand All @@ -219,30 +217,6 @@ impl TableViews {
/// |row: &tskit::NodeTableRow| row.time > 0.,
/// );
/// assert_eq!(samples[0], 1);
///
/// // Get all nodes that have a mutation:
///
/// // fn node_has_mutation(
/// // // dyn trait here means this
/// // // will work with TreeSequence, too.
/// // tables_type: &dyn std::ops::Deref<Target=tskit::table_views::TableViews>,
/// // row: &tskit::NodeTableRow,
/// // ) -> bool {
/// // for mrow in tables_type.mutations_iter() {
/// // if mrow.node == row.id {
/// // return true;
/// // }
/// // }
/// // false
/// // }
///
/// // // Get all nodes that have a mutation:
///
/// // tables.add_mutation(0, 0, tskit::MutationId::NULL, 0.0, None).unwrap();
/// // let samples_with_mut = tables.create_node_id_vector(
/// // |row: &tskit::NodeTableRow| node_has_mutation(&tables, row));
/// // assert_eq!(samples_with_mut[0], 0);
/// ```
pub fn create_node_id_vector(
&self,
f: impl FnMut(&crate::NodeTableRow) -> bool,
Expand Down