correctly identify when format is csv
This commit is contained in:
parent
fdc45cea3f
commit
52c70d6f66
|
@ -36,6 +36,7 @@ impl Formatter {
|
||||||
Formatter::Text => text::print_formatted(entries, out, now, ids, term_width)?,
|
Formatter::Text => text::print_formatted(entries, out, now, ids, term_width)?,
|
||||||
Formatter::Csv => csv::print_formatted(entries, out, ids)?,
|
Formatter::Csv => csv::print_formatted(entries, out, ids)?,
|
||||||
Formatter::Custom(name) => {
|
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 {
|
Ok(match &*lower {
|
||||||
"text" => Formatter::Text,
|
"text" => Formatter::Text,
|
||||||
|
"csv" => Formatter::Csv,
|
||||||
custom_format => Formatter::Custom(custom_format.into()),
|
custom_format => Formatter::Custom(custom_format.into()),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue