Skip to content

Commit 2640b62

Browse files
authored
clean up unused test code (#414)
1 parent 4735b9f commit 2640b62

File tree

2 files changed

+0
-51
lines changed

2 files changed

+0
-51
lines changed

src/_macros.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,8 +1280,6 @@ macro_rules! delegate_table_view_api {
12801280
/// Get all nodes with time > 0.0:
12811281
///
12821282
/// ```
1283-
/// use tskit::bindings::tsk_id_t;
1284-
///
12851283
/// let mut tables = tskit::TableCollection::new(100.).unwrap();
12861284
/// tables
12871285
/// .add_node(tskit::TSK_NODE_IS_SAMPLE, 0.0, tskit::PopulationId::NULL,
@@ -1295,29 +1293,6 @@ macro_rules! delegate_table_view_api {
12951293
/// |row: &tskit::NodeTableRow| row.time > 0.,
12961294
/// );
12971295
/// assert_eq!(samples[0], 1);
1298-
///
1299-
/// // Get all nodes that have a mutation:
1300-
///
1301-
/// // fn node_has_mutation(
1302-
/// // // dyn trait here means this
1303-
/// // // will work with TreeSequence, too.
1304-
/// // tables_type: &dyn std::ops::Deref<Target=tskit::table_views::TableViews>,
1305-
/// // row: &tskit::NodeTableRow,
1306-
/// // ) -> bool {
1307-
/// // for mrow in tables_type.mutations_iter() {
1308-
/// // if mrow.node == row.id {
1309-
/// // return true;
1310-
/// // }
1311-
/// // }
1312-
/// // false
1313-
/// // }
1314-
///
1315-
/// // // Get all nodes that have a mutation:
1316-
///
1317-
/// // tables.add_mutation(0, 0, tskit::MutationId::NULL, 0.0, None).unwrap();
1318-
/// // let samples_with_mut = tables.create_node_id_vector(
1319-
/// // |row: &tskit::NodeTableRow| node_has_mutation(&tables, row));
1320-
/// // assert_eq!(samples_with_mut[0], 0);
13211296
/// ```
13221297
pub fn create_node_id_vector(&self, f: impl FnMut(&crate::NodeTableRow) -> bool) -> Vec<crate::NodeId>;
13231298
}

src/table_views.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,6 @@ impl TableViews {
204204
/// Get all nodes with time > 0.0:
205205
///
206206
/// ```
207-
/// use tskit::bindings::tsk_id_t;
208-
///
209207
/// let mut tables = tskit::TableCollection::new(100.).unwrap();
210208
/// tables
211209
/// .add_node(tskit::TSK_NODE_IS_SAMPLE, 0.0, tskit::PopulationId::NULL,
@@ -219,30 +217,6 @@ impl TableViews {
219217
/// |row: &tskit::NodeTableRow| row.time > 0.,
220218
/// );
221219
/// assert_eq!(samples[0], 1);
222-
///
223-
/// // Get all nodes that have a mutation:
224-
///
225-
/// // fn node_has_mutation(
226-
/// // // dyn trait here means this
227-
/// // // will work with TreeSequence, too.
228-
/// // tables_type: &dyn std::ops::Deref<Target=tskit::table_views::TableViews>,
229-
/// // row: &tskit::NodeTableRow,
230-
/// // ) -> bool {
231-
/// // for mrow in tables_type.mutations_iter() {
232-
/// // if mrow.node == row.id {
233-
/// // return true;
234-
/// // }
235-
/// // }
236-
/// // false
237-
/// // }
238-
///
239-
/// // // Get all nodes that have a mutation:
240-
///
241-
/// // tables.add_mutation(0, 0, tskit::MutationId::NULL, 0.0, None).unwrap();
242-
/// // let samples_with_mut = tables.create_node_id_vector(
243-
/// // |row: &tskit::NodeTableRow| node_has_mutation(&tables, row));
244-
/// // assert_eq!(samples_with_mut[0], 0);
245-
/// ```
246220
pub fn create_node_id_vector(
247221
&self,
248222
f: impl FnMut(&crate::NodeTableRow) -> bool,

0 commit comments

Comments
 (0)