-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON Export Reapply #45
Conversation
No longer serialize into strings, instead use Vec<u8> as it is what we're writing to the files. Fixup comments
@@ -51,16 +54,19 @@ impl ExportEntry { | |||
|
|||
/// The ResultExportType enum is used to denote the desired form | |||
/// of exporter to use for a given file. | |||
#[derive(Clone)] | |||
pub enum ResultExportType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe consider using this enum
just to track the type of export and pass the file path as a separate argument? Just a thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, as I was looking at it, these two pieces of data are intrinsically linked to one-another. I didn't really see any benefit in breaking them apart, just to have to bring them back together or store the file name somewhere else. However, I just noticed that there is no reason to derive clone on this type and it can safely be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #46
csv_file: Option<&'a str>, | ||
} | ||
|
||
fn create_exporter(targets: ExportTargetList) -> Option<ExportManager> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have an idea of how to refactor this slightly, but I can do that in a separate PR. I will add you as a reviewer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this was next on my list, after I brought the markdown branch into PR scope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #46
Great stuff! Thank you very much (again). |
Replaces #43, and relates to #42, fixup the commits and clean up some comments