Skip to content

Commit ba8b38d

Browse files
committed
[src/code.rs] Apply changed from PR comments
1 parent 5e19ba6 commit ba8b38d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/code.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ fn build_default_impl_fn<'a>(
817817
/// Generate a full file for a given diesel table
818818
pub 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

0 commit comments

Comments
 (0)