Skip to content

Commit 2ba63de

Browse files
committed
build
1 parent b88e6f0 commit 2ba63de

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

src/edge_differences.rs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,24 @@ pub type EdgeRemoval = EdgeDifference<Removal>;
7474

7575
/// Manages iteration over trees to obtain
7676
/// edge differences.
77-
pub struct EdgeDifferencesIterator {}
77+
pub struct EdgeDifferencesIterator<'ts> {
78+
treeseq: &'ts TreeSequence,
79+
}
7880

79-
impl EdgeDifferencesIterator {}
81+
impl<'ts> EdgeDifferencesIterator<'ts> {
82+
pub(crate) fn new(treeseq: &'ts TreeSequence) -> Self {
83+
todo!()
84+
}
85+
}
86+
87+
pub struct EdgeDifferences<'ts> {
88+
marker: std::marker::PhantomData<&'ts ()>,
89+
}
90+
91+
impl<'ts> Iterator for EdgeDifferencesIterator<'ts> {
92+
type Item = EdgeDifferences<'ts>;
93+
94+
fn next(&mut self) -> Option<Self::Item> {
95+
todo!()
96+
}
97+
}

src/trees/treeseq.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -478,15 +478,10 @@ impl TreeSequence {
478478
}
479479

480480
/// Build a lending iterator over edge differences.
481-
///
482-
/// # Errors
483-
///
484-
/// * [`TskitError`] if the `C` back end is unable to allocate
485-
/// needed memory
486481
pub fn edge_differences_iter(
487482
&self,
488-
) -> Result<crate::edge_differences::EdgeDifferencesIterator, TskitError> {
489-
crate::edge_differences::EdgeDifferencesIterator::new_from_treeseq(self, 0)
483+
) -> crate::edge_differences::EdgeDifferencesIterator {
484+
crate::edge_differences::EdgeDifferencesIterator::new(self)
490485
}
491486

492487
/// Reference to the underlying table collection.

0 commit comments

Comments
 (0)