diff --git a/src/cache/cache.rs b/src/cache/cache.rs index 34959f2..7d8fd3f 100644 --- a/src/cache/cache.rs +++ b/src/cache/cache.rs @@ -55,7 +55,7 @@ impl Cache { match resolution { Resolution::TODAY => self.day.as_ref(), Resolution::HistDays90 => self.hist_90.as_ref(), - Resolution::HistDay => self.hist_day.as_ref(), + Resolution::HistDaysAll => self.hist_day.as_ref(), } } @@ -64,7 +64,7 @@ impl Cache { match resolution { Resolution::TODAY => self.day = cache_line_opt, Resolution::HistDays90 => self.hist_90 = cache_line_opt, - Resolution::HistDay => self.hist_day = cache_line_opt, + Resolution::HistDaysAll => self.hist_day = cache_line_opt, } } diff --git a/src/cli.rs b/src/cli.rs index 955c1dd..ef06a90 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -47,8 +47,10 @@ pub enum SortBy { #[derive(Debug, Clone, Copy, ValueEnum)] pub enum Resolution { TODAY, + #[clap(name = "hist-90-days")] HistDays90, - HistDay, + #[clap(name = "hist-all-days")] + HistDaysAll, } impl Resolution { @@ -56,7 +58,7 @@ impl Resolution { match self { Resolution::TODAY => ecb_url::TODAY, Resolution::HistDays90 => ecb_url::hist::DAYS_90, - Resolution::HistDay => ecb_url::hist::DAILY, + Resolution::HistDaysAll => ecb_url::hist::DAYS_ALL, } } } diff --git a/src/lib.rs b/src/lib.rs index 8fdb996..81f1f91 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ pub mod ecb_url { pub const TODAY: &'static str = "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"; pub mod hist { - pub const DAILY: &'static str = + pub const DAYS_ALL: &'static str = "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.xml"; pub const DAYS_90: &'static str = "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml";