You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: remove lifetime annotation from table types
* Types like EdgeTable no longer require lifetimes.
* tskit::table_views::TableViews is now a Deref
target of TableCollection and TreeSequence.
* This Deref target replaces the behaviors
of the TableAccess and NodeListGenerator
traits, which have been removed.
* TableViews is a DerefMut target
of TableCollection.
* The removed traits affect the contents
of the crate prelude.
* Some code that would not compile due
to dropped temporaries will now compile.
(Doc tests updated accordingly.)
* The new fn nodes_mut addresses API breakage.
These changes are a BIG WIN for overall design.
BREAKING CHANGE: traits replaced with Deref targets
@@ -319,10 +334,10 @@ match tables.individuals().metadata::<MutationMetadata>(0.into())
319
334
/// types](https://doc.rust-lang.org/book/ch19-03-advanced-traits.html#specifying-placeholder-types-in-trait-definitions-with-associated-types) to enforce at *compile time* that exactly one type (`struct/enum`, etc.) is a valid
320
335
/// metadata type for a table.
321
336
pubfnmetadata<T: metadata::IndividualMetadata>(
322
-
&'aself,
337
+
&self,
323
338
row:IndividualId,
324
339
) -> Option<Result<T,TskitError>>{
325
-
let table_ref = self.table_;
340
+
let table_ref = self.as_ref();
326
341
let buffer = metadata_to_vector!(self, table_ref, row.0)?;
0 commit comments