correctly identify when format is csv

This commit is contained in:
Abraham Toriz 2021-06-30 19:36:08 -05:00
parent fdc45cea3f
commit 52c70d6f66
No known key found for this signature in database
GPG Key ID: D5B4A746DB5DD42A
2 changed files with 3 additions and 1 deletions

View File

@ -36,6 +36,7 @@ impl Formatter {
Formatter::Text => text::print_formatted(entries, out, now, ids, term_width)?,
Formatter::Csv => csv::print_formatted(entries, out, ids)?,
Formatter::Custom(name) => {
panic!("attempted custom formatter with name {} which is not implemented", name);
}
}
@ -51,6 +52,7 @@ impl FromStr for Formatter {
Ok(match &*lower {
"text" => Formatter::Text,
"csv" => Formatter::Csv,
custom_format => Formatter::Custom(custom_format.into()),
})
}