From 55693f2742da92a09b82aaae0e21c4d36cd9fa1b Mon Sep 17 00:00:00 2001 From: Giacomo Bagnoli Date: Tue, 30 Aug 2022 21:36:42 +0100 Subject: [PATCH] Fix bug: inverseorder from config not respected --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 9 ++------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 79a7c26..8653ee4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -645,7 +645,7 @@ dependencies = [ [[package]] name = "tzbuddy" -version = "0.3.0" +version = "0.3.1" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 4a472a5..5a8b396 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tzbuddy" -version = "0.3.0" +version = "0.3.1" authors = ["Giacomo Bagnoli "] edition = "2018" homepage = "https://github.com/gbagnoli/tzbuddy.rs" diff --git a/src/main.rs b/src/main.rs index 4f77514..c72fe1a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -231,7 +231,7 @@ fn main() -> Result<()> { let mut sort_order = SortOrder::East; if cli.noorder || config.noorder { sort_order = SortOrder::None; - } else if cli.inverseorder || config.noorder { + } else if cli.inverseorder || config.inverseorder { sort_order = SortOrder::West; } let timezones = match cli.timezones.len() { @@ -244,11 +244,6 @@ fn main() -> Result<()> { }; let ampm = cli.ampm || config.ampm; let tzhours = calculate_timezone_hours(get_timezones(timezones), date, span, ampm, sort_order); - print_table( - tzhours, - date, - cli.noheader || config.noheader, - cli.ampm || config.ampm, - ); + print_table(tzhours, date, cli.noheader || config.noheader, ampm); Ok(()) }