Skip to content

Commit e5a8c0b

Browse files
authored
refactor: properly re-export streaming_iterator types (#763)
1 parent f9288fa commit e5a8c0b

17 files changed

+41
-38
lines changed

examples/haploid_wright_fisher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ fn stress_test_total_branch_length() {
156156
// stress test the branch length fn b/c it is not a trivial
157157
// wrapper around the C API.
158158
{
159-
use streaming_iterator::StreamingIterator;
159+
use tskit::StreamingIterator;
160160
let mut x = f64::NAN;
161161
if let Ok(mut tree_iter) = ts.tree_iterator(0) {
162162
// We will only do the first tree to save time.

src/edge_differences.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ impl EdgeDifferencesIterator {
236236
}
237237
}
238238

239-
impl streaming_iterator::StreamingIterator for EdgeDifferencesIterator {
239+
impl crate::StreamingIterator for EdgeDifferencesIterator {
240240
type Item = EdgeDifferencesIterator;
241241

242242
fn advance(&mut self) {

src/edge_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl PartialEq<EdgeTableRowView<'_>> for EdgeTableRow {
124124
}
125125
}
126126

127-
impl streaming_iterator::StreamingIterator for EdgeTableRowView<'_> {
127+
impl crate::StreamingIterator for EdgeTableRowView<'_> {
128128
type Item = Self;
129129

130130
row_lending_iterator_get!();

src/individual_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl PartialEq<IndividualTableRowView<'_>> for IndividualTableRow {
8282
}
8383
}
8484

85-
impl streaming_iterator::StreamingIterator for IndividualTableRowView<'_> {
85+
impl crate::StreamingIterator for IndividualTableRowView<'_> {
8686
type Item = Self;
8787

8888
row_lending_iterator_get!();

src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@
8282
#[cfg(feature = "bindings")]
8383
pub use sys::bindings;
8484

85+
pub use streaming_iterator::DoubleEndedStreamingIterator;
86+
pub use streaming_iterator::StreamingIterator;
87+
8588
mod _macros; // Starts w/_ to be sorted at front by rustfmt!
8689
mod edge_differences;
8790
mod edge_table;
@@ -117,9 +120,9 @@ pub use site_table::{SiteTable, SiteTableRow};
117120
pub use sys::flags::*;
118121
pub use sys::NodeTraversalOrder;
119122
pub use table_collection::TableCollection;
120-
pub use traits::TableColumn;
121123
pub use traits::IndividualLocation;
122124
pub use traits::IndividualParents;
125+
pub use traits::TableColumn;
123126
pub use trees::{Tree, TreeSequence};
124127

125128
// Optional features

src/migration_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl PartialEq<MigrationTableRowView<'_>> for MigrationTableRow {
142142
}
143143
}
144144

145-
impl streaming_iterator::StreamingIterator for MigrationTableRowView<'_> {
145+
impl crate::StreamingIterator for MigrationTableRowView<'_> {
146146
type Item = Self;
147147

148148
row_lending_iterator_get!();

src/mutation_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl PartialEq<MutationTableRowView<'_>> for MutationTableRow {
140140
}
141141
}
142142

143-
impl streaming_iterator::StreamingIterator for MutationTableRowView<'_> {
143+
impl crate::StreamingIterator for MutationTableRowView<'_> {
144144
type Item = Self;
145145

146146
row_lending_iterator_get!();

src/node_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl PartialEq<NodeTableRowView<'_>> for NodeTableRow {
125125
}
126126
}
127127

128-
impl streaming_iterator::StreamingIterator for NodeTableRowView<'_> {
128+
impl crate::StreamingIterator for NodeTableRowView<'_> {
129129
type Item = Self;
130130

131131
row_lending_iterator_get!();

src/population_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl PartialEq<PopulationTableRowView<'_>> for PopulationTableRow {
9595
}
9696
}
9797

98-
impl streaming_iterator::StreamingIterator for PopulationTableRowView<'_> {
98+
impl crate::StreamingIterator for PopulationTableRowView<'_> {
9999
type Item = Self;
100100

101101
row_lending_iterator_get!();

src/prelude.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Export commonly-use types and traits
22
3-
pub use streaming_iterator::DoubleEndedStreamingIterator;
4-
pub use streaming_iterator::StreamingIterator;
3+
pub use crate::DoubleEndedStreamingIterator;
4+
pub use crate::StreamingIterator;
55
pub use {
66
crate::EdgeId, crate::IndividualId, crate::Location, crate::MigrationId, crate::MutationId,
77
crate::NodeId, crate::PopulationId, crate::Position, crate::RawFlags, crate::SiteId,

0 commit comments

Comments
 (0)