mirror of
https://github.com/lov3b/ecb-rates.git
synced 2025-02-22 09:50:10 +01:00
Better time name
This commit is contained in:
parent
34f40b3602
commit
f116b06c0c
@ -13,9 +13,9 @@ pub struct Cli {
|
||||
#[arg(value_enum, default_value_t = FormatOption::Plain)]
|
||||
pub command: FormatOption,
|
||||
|
||||
/// Show the time in the output
|
||||
#[arg(long = "display-time", default_value_t = true)]
|
||||
pub display_time: bool,
|
||||
/// Don't show time in output
|
||||
#[arg(long = "no-time")]
|
||||
pub no_time: bool,
|
||||
|
||||
/// Print currencies in a compact single line
|
||||
#[arg(long = "compact")]
|
||||
|
@ -94,7 +94,7 @@ async fn main() -> ExitCode {
|
||||
.map(|x| serde_json::to_value(x).expect("Failed to parse content as JSON value"))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
if !cli.display_time {
|
||||
if cli.no_time {
|
||||
json_values
|
||||
.iter_mut()
|
||||
.filter_map(|json_value| json_value.as_object_mut())
|
||||
|
Loading…
x
Reference in New Issue
Block a user