@@ -882,11 +882,11 @@ impl TableCollection {
882882 /// Return a [`crate::TreeSequence`] based on the tables.
883883 /// This function will raise errors if tables are not sorted,
884884 /// not indexed, or invalid in any way.
885- pub fn tree_sequence (
885+ pub fn tree_sequence < F : Into < TreeSequenceFlags > > (
886886 self ,
887- flags : TreeSequenceFlags ,
887+ flags : F ,
888888 ) -> Result < crate :: TreeSequence , TskitError > {
889- crate :: TreeSequence :: new ( self , flags)
889+ crate :: TreeSequence :: new ( self , flags. into ( ) )
890890 }
891891
892892 /// Simplify tables in place.
@@ -979,9 +979,9 @@ impl TableCollection {
979979 /// tables.add_edge(0., 10.0, tskit::NodeId::NULL, 0);
980980 /// tables.check_integrity(tskit::TableIntegrityCheckFlags::default()).unwrap();
981981 /// ```
982- pub fn check_integrity ( & self , flags : TableIntegrityCheckFlags ) -> TskReturnValue {
982+ pub fn check_integrity < F : Into < TableIntegrityCheckFlags > > ( & self , flags : F ) -> TskReturnValue {
983983 let rv = unsafe {
984- ll_bindings:: tsk_table_collection_check_integrity ( self . as_ptr ( ) , flags. bits ( ) )
984+ ll_bindings:: tsk_table_collection_check_integrity ( self . as_ptr ( ) , flags. into ( ) . bits ( ) )
985985 } ;
986986 handle_tsk_return_value ! ( rv)
987987 }
0 commit comments