@@ -103,38 +103,43 @@ impl TrackingTableSetupStatus {
103103}
104104
105105impl ResourceSetupStatus for TrackingTableSetupStatus {
106- fn describe_changes ( & self ) -> Vec < String > {
107- let mut changes: Vec < String > = vec ! [ ] ;
106+ fn describe_changes ( & self ) -> Vec < setup :: ChangeDescription > {
107+ let mut changes: Vec < setup :: ChangeDescription > = vec ! [ ] ;
108108 if self . desired_state . is_some ( ) && !self . legacy_table_names . is_empty ( ) {
109- changes. push ( format ! (
109+ changes. push ( setup :: ChangeDescription :: Action ( format ! (
110110 "Rename legacy tracking tables: {}. " ,
111111 self . legacy_table_names. join( ", " )
112- ) ) ;
112+ ) ) ) ;
113113 }
114114 match ( self . min_existing_version_id , & self . desired_state ) {
115115 ( None , Some ( state) ) => {
116- changes. push ( format ! ( "Create the tracking table: {}. " , state. table_name) )
116+ changes. push ( setup:: ChangeDescription :: Action ( format ! (
117+ "Create the tracking table: {}. " ,
118+ state. table_name
119+ ) ) ) ;
117120 }
118121 ( Some ( min_version_id) , Some ( desired) ) => {
119122 if min_version_id < desired. version_id {
120- changes. push ( "Update the tracking table. " . into ( ) ) ;
123+ changes. push ( setup:: ChangeDescription :: Action (
124+ "Update the tracking table. " . into ( ) ,
125+ ) ) ;
121126 }
122127 }
123- ( Some ( _) , None ) => changes. push ( format ! (
128+ ( Some ( _) , None ) => changes. push ( setup :: ChangeDescription :: Action ( format ! (
124129 "Drop existing tracking table: {}. " ,
125130 self . legacy_table_names. join( ", " )
126- ) ) ,
131+ ) ) ) ,
127132 ( None , None ) => ( ) ,
128133 }
129134 if !self . source_ids_to_delete . is_empty ( ) {
130- changes. push ( format ! (
135+ changes. push ( setup :: ChangeDescription :: Action ( format ! (
131136 "Delete source IDs: {}. " ,
132137 self . source_ids_to_delete
133138 . iter( )
134139 . map( |id| id. to_string( ) )
135140 . collect:: <Vec <String >>( )
136141 . join( ", " )
137- ) ) ;
142+ ) ) ) ;
138143 }
139144 changes
140145 }
0 commit comments