Skip to content

Commit 5c4cca4

Browse files
committed
refactor: Separate tree ownership from API.
* Add TreeInterface, which is the Deref target for Tree.
1 parent 4871072 commit 5c4cca4

File tree

4 files changed

+908
-836
lines changed

4 files changed

+908
-836
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ mod site_table;
9393
mod table_collection;
9494
mod table_iterator;
9595
mod traits;
96+
mod tree_interface;
9697
mod trees;
9798
pub mod types;
9899
mod util;
@@ -437,7 +438,8 @@ pub use traits::IndividualParents;
437438
pub use traits::NodeListGenerator;
438439
pub use traits::TableAccess;
439440
pub use traits::TskitTypeAccess;
440-
pub use trees::{NodeTraversalOrder, Tree, TreeSequence};
441+
pub use tree_interface::{NodeTraversalOrder, TreeInterface};
442+
pub use trees::{Tree, TreeSequence};
441443

442444
// Optional features
443445
#[cfg(any(feature = "provenance", doc))]

src/table_collection.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,8 @@ impl TableCollection {
11191119
}
11201120

11211121
#[cfg(any(doc, feature = "provenance"))]
1122-
/// Set the provenance table from an [`OwnedProvenanceTable`](`crate::provenance::OwnedSiteTable`)
1122+
/// Set the provenance table from an
1123+
/// [`OwnedProvenanceTable`](`crate::provenance::OwnedProvenanceTable`)
11231124
///
11241125
/// # Errors
11251126
///

0 commit comments

Comments
 (0)