🛠️ Fix incorrect CSV format in OutputFormat::CSV. (#10)

This commit is contained in:
2024-04-27 20:19:10 +02:00
committed by GitHub
parent d20940f89b
commit 82108d9e36

2
schemsearch-cli/src/sinks.rs Normal file → Executable file
View File

@ -71,7 +71,7 @@ impl OutputFormat {
pub fn start(&self, total: u32, search_behavior: &SearchBehavior, start_time: u128) -> String { pub fn start(&self, total: u32, search_behavior: &SearchBehavior, start_time: u128) -> String {
match self { match self {
OutputFormat::Text => format!("Starting search in {} schematics\n", total), OutputFormat::Text => format!("Starting search in {} schematics\n", total),
OutputFormat::CSV => format!("Name,X,Y,Z,Percent\n"), OutputFormat::CSV => "Name,X,Y,Z,Percent\n".to_owned(),
OutputFormat::JSON => format!("{}\n", serde_json::to_string(&JsonEvent::Init(InitEvent { OutputFormat::JSON => format!("{}\n", serde_json::to_string(&JsonEvent::Init(InitEvent {
total, total,
search_behavior: search_behavior.clone(), search_behavior: search_behavior.clone(),