Adding format to select between normal, clean and JSON. This needs some refactor
This commit is contained in:
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user