-
Notifications
You must be signed in to change notification settings - Fork 5
remove table struct lifetimes #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have to remove some pub fns for NodeTable that take &mut self as references.
This is a BREAKING change.
src/table_collection.rs
Outdated
pub struct TableCollection { | ||
pub(crate) inner: MBox<ll_bindings::tsk_table_collection_t>, | ||
populations: PopulationTable, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is repeating in TreeSequence. We need a new struct to abstract this out.
Closing -- see #262. |
Table types are currently defined as
EdgeTable<'a>
,where the lifetime is that of the table collection
owning the tables.
We need to relax this lifetime bound in order to
support standalone tables.
This PR:
They now store
*const
instead of&'a
referencesto the low-level table type.
TableCollection to store instances of the table
types.
TableAccess
functionsto be
&Table
instead ofTable
.These changes will go into a new version number.
The last change is technically a break change:
client codes implementing the trait will have their
implementations break. However, I suspect no one has
done so.