Cargo fmt
This commit is contained in:
parent
8a3e5783c2
commit
a274ed7535
15
src/cli.rs
15
src/cli.rs
@ -1,6 +1,6 @@
|
|||||||
use structopt::StructOpt;
|
use structopt::StructOpt;
|
||||||
|
|
||||||
use crate::{temp_unit::TempUnit, speed_unit::SpeedUnit, data_format::DataFormat};
|
use crate::{data_format::DataFormat, speed_unit::SpeedUnit, temp_unit::TempUnit};
|
||||||
|
|
||||||
#[derive(Debug, StructOpt)]
|
#[derive(Debug, StructOpt)]
|
||||||
#[structopt(
|
#[structopt(
|
||||||
@ -34,14 +34,12 @@ pub enum Arguments {
|
|||||||
is_day: bool,
|
is_day: bool,
|
||||||
#[structopt(short = "t", long, help = "Displays the decimal temperature")]
|
#[structopt(short = "t", long, help = "Displays the decimal temperature")]
|
||||||
temperature: bool,
|
temperature: bool,
|
||||||
#[structopt(long,
|
#[structopt(long, possible_values = &TempUnit::variants(), default_value = "Celsius" , case_insensitive = true,
|
||||||
possible_values = &TempUnit::variants(), default_value = "Celsius" , case_insensitive = true,
|
|
||||||
help = "Switches between Celsius or Fahrenheit")]
|
help = "Switches between Celsius or Fahrenheit")]
|
||||||
temperature_unit: TempUnit,
|
temperature_unit: TempUnit,
|
||||||
#[structopt(short = "w", long, help = "Displays the decimal wind speed")]
|
#[structopt(short = "w", long, help = "Displays the decimal wind speed")]
|
||||||
windspeed: bool,
|
windspeed: bool,
|
||||||
#[structopt(long,
|
#[structopt(long, possible_values = &SpeedUnit::variants(), default_value = "Kmh" , case_insensitive = true,
|
||||||
possible_values = &SpeedUnit::variants(), default_value = "Kmh" , case_insensitive = true,
|
|
||||||
help = "Switches between km/h, m/s, mp/h or knots")]
|
help = "Switches between km/h, m/s, mp/h or knots")]
|
||||||
speed_unit: SpeedUnit,
|
speed_unit: SpeedUnit,
|
||||||
#[structopt(short = "W", long, help = "Displays the wind direction, in degrees")]
|
#[structopt(short = "W", long, help = "Displays the wind direction, in degrees")]
|
||||||
@ -50,12 +48,11 @@ pub enum Arguments {
|
|||||||
include_coords: bool,
|
include_coords: bool,
|
||||||
#[structopt(long = "city", help = "Displays the city")]
|
#[structopt(long = "city", help = "Displays the city")]
|
||||||
include_city: bool,
|
include_city: bool,
|
||||||
|
|
||||||
#[structopt(long,
|
#[structopt(long, possible_values = &DataFormat::variants(), default_value = "Normal" , case_insensitive = true,
|
||||||
possible_values = &DataFormat::variants(), default_value = "Normal" , case_insensitive = true,
|
|
||||||
help = "Switches data format between Normal, Clean or JSON")]
|
help = "Switches data format between Normal, Clean or JSON")]
|
||||||
format: DataFormat,
|
format: DataFormat,
|
||||||
|
|
||||||
#[structopt(
|
#[structopt(
|
||||||
short = "c",
|
short = "c",
|
||||||
long,
|
long,
|
||||||
|
Loading…
Reference in New Issue
Block a user