Skip to content

Commit

Permalink
fix(code): dont set "Some("")", use "None"
Browse files Browse the repository at this point in the history
this works because all places that use this variable use "unwrap_or*"
  • Loading branch information
hasezoey committed Oct 1, 2023
1 parent 7892554 commit a8ce827
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ impl<'a> Struct<'a> {

if fields.is_empty() {
self.has_fields = Some(false);
self.rendered_code = Some("".to_string());
self.rendered_code = None;
} else {
self.has_fields = Some(true);
self.rendered_code = Some(struct_code.replace("$COLUMNS$", &lines.join("\n")));
Expand Down

0 comments on commit a8ce827

Please sign in to comment.