File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -817,7 +817,7 @@ fn build_default_impl_fn<'a>(
817817/// Generate a full file for a given diesel table
818818pub fn generate_for_table ( table : & ParsedTableMacro , config : & GenerationConfig ) -> String {
819819 // early to ensure the table options are set for the current table
820- let struct_name = table. struct_name . to_string ( ) ;
820+ let struct_name = & table. struct_name ;
821821 let table_options = config. table ( & table. name . to_string ( ) ) ;
822822 let generated_columns = table_options. get_autogenerated_columns ( ) ;
823823
@@ -849,7 +849,6 @@ pub fn generate_for_table(table: &ParsedTableMacro, config: &GenerationConfig) -
849849 . as_str ( ) ,
850850 ) ;
851851 }
852- ret_buffer. push ( '\n' ) ;
853852 }
854853
855854 let update_struct = Struct :: new ( StructType :: Update , table, config) ;
@@ -871,7 +870,6 @@ pub fn generate_for_table(table: &ParsedTableMacro, config: &GenerationConfig) -
871870 build_default_impl_fn ( & struct_name, table. columns . iter ( ) . filter ( not_generated) )
872871 . as_str ( ) ,
873872 ) ;
874- ret_buffer. push ( '\n' ) ;
875873 }
876874
877875 ret_buffer
You can’t perform that action at this time.
0 commit comments