File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ pub trait Provenance: crate::TableAccess {
100100 /// # Parameters
101101 ///
102102 /// * `record`: the provenance record
103- fn add_provenance ( & mut self , record : & str ) -> crate :: TskReturnValue ;
103+ fn add_provenance ( & mut self , record : & str ) -> Result < ProvenanceId , TskitError > ;
104104 /// Return an immutable reference to the table, type [`ProvenanceTable`]
105105 fn provenances ( & self ) -> ProvenanceTable ;
106106 /// Return an iterator over the rows of the [`ProvenanceTable`].
Original file line number Diff line number Diff line change @@ -633,7 +633,7 @@ impl crate::traits::NodeListGenerator for TableCollection {}
633633
634634#[ cfg( any( doc, feature = "provenance" ) ) ]
635635impl crate :: provenance:: Provenance for TableCollection {
636- fn add_provenance ( & mut self , record : & str ) -> TskReturnValue {
636+ fn add_provenance ( & mut self , record : & str ) -> Result < crate :: ProvenanceId , TskitError > {
637637 if record. is_empty ( ) {
638638 return Err ( TskitError :: ValueError {
639639 got : String :: from ( "empty string slice" ) ,
@@ -650,7 +650,7 @@ impl crate::provenance::Provenance for TableCollection {
650650 record. len ( ) as tsk_size_t ,
651651 )
652652 } ;
653- handle_tsk_return_value ! ( rv)
653+ handle_tsk_return_value ! ( rv, crate :: ProvenanceId :: from ( rv ) )
654654 }
655655
656656 fn provenances ( & self ) -> crate :: provenance:: ProvenanceTable {
Original file line number Diff line number Diff line change @@ -1135,7 +1135,7 @@ impl crate::traits::NodeListGenerator for TreeSequence {}
11351135
11361136#[ cfg( any( doc, feature = "provenance" ) ) ]
11371137impl crate :: provenance:: Provenance for TreeSequence {
1138- fn add_provenance ( & mut self , record : & str ) -> TskReturnValue {
1138+ fn add_provenance ( & mut self , record : & str ) -> Result < crate :: ProvenanceId , TskitError > {
11391139 if record. is_empty ( ) {
11401140 return Err ( TskitError :: ValueError {
11411141 got : String :: from ( "empty string slice" ) ,
@@ -1152,7 +1152,7 @@ impl crate::provenance::Provenance for TreeSequence {
11521152 record. len ( ) as tsk_size_t ,
11531153 )
11541154 } ;
1155- handle_tsk_return_value ! ( rv)
1155+ handle_tsk_return_value ! ( rv, crate :: ProvenanceId :: from ( rv ) )
11561156 }
11571157
11581158 fn provenances ( & self ) -> crate :: provenance:: ProvenanceTable {
You can’t perform that action at this time.
0 commit comments