Skip to content

Commit 4a484fc

Browse files
committed
don't like the ergonomics there
1 parent 8ed792c commit 4a484fc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_edge_difference_iteration.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ fn make_treeseq() -> tskit::TreeSequence {
5656
.unwrap()
5757
}
5858

59+
#[test]
60+
fn test_collected_edge_insertions() {
61+
let ts = make_treeseq();
62+
let insertions = ts
63+
.edge_differences_iter()
64+
.flat_map(|d| d.insertions().collect::<Vec<_>>())
65+
.collect::<Vec<_>>();
66+
assert_eq!(insertions.len(), ts.edge_insertion_order().len());
67+
}
68+
5969
// A fundamental property of iterators is that their Items
6070
// are collectible into objects that are valid to use later.
6171
#[test]

0 commit comments

Comments
 (0)