Adding format to select between normal, clean and JSON. This needs some refactor

This commit is contained in:
2023-06-13 18:38:32 +02:00
parent 9978e1553b
commit 8a3e5783c2
10 changed files with 507 additions and 306 deletions

View File

@ -1,4 +1,4 @@
use crate::{speed_unit::SpeedUnit, temp_unit::TempUnit};
use crate::{data_format::DataFormat, speed_unit::SpeedUnit, temp_unit::TempUnit};
pub struct CurrentWeatherPrintParams {
pub all: bool,
@ -10,7 +10,7 @@ pub struct CurrentWeatherPrintParams {
pub winddirection: bool,
pub include_coords: bool,
pub include_city: bool,
pub clean: bool,
pub format: DataFormat,
}
impl CurrentWeatherPrintParams {
@ -24,7 +24,7 @@ impl CurrentWeatherPrintParams {
winddirection: bool,
include_coords: bool,
include_city: bool,
clean: bool,
format: DataFormat,
) -> CurrentWeatherPrintParams {
CurrentWeatherPrintParams {
all,
@ -36,7 +36,7 @@ impl CurrentWeatherPrintParams {
winddirection,
include_coords,
include_city,
clean,
format,
}
}
}