upgrade, and refactor imports
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@ -1,8 +1,7 @@
|
||||
use structopt::StructOpt;
|
||||
|
||||
use crate::{
|
||||
formats::data_format::DataFormat, formats::speed_unit::SpeedUnit, formats::temp_unit::TempUnit,
|
||||
};
|
||||
use structopt::StructOpt;
|
||||
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[structopt(
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::current_weather_output::CurrentWeatherOutput;
|
||||
use crate::{
|
||||
coords::Coordinates, current_weather_print_params::CurrentWeatherPrintParams,
|
||||
coords::Coordinates, current_weather_output::CurrentWeatherOutput,
|
||||
current_weather_print_params::CurrentWeatherPrintParams,
|
||||
open_meteo::current_weather::CurrentWeather,
|
||||
};
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
current_weather_output_model::CurrentWeatherOutputModel,
|
||||
formats::data_format::DataFormat,
|
||||
formats::speed_unit::{speed_to_unit_string, SpeedUnit},
|
||||
formats::temp_unit::{temp_to_unit_string, TempUnit},
|
||||
formats::{
|
||||
data_format::DataFormat,
|
||||
speed_unit::{speed_to_unit_string, SpeedUnit},
|
||||
temp_unit::{temp_to_unit_string, TempUnit},
|
||||
},
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt::Display;
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct CurrentWeatherOutput {
|
||||
|
17
src/main.rs
17
src/main.rs
@ -4,41 +4,38 @@ mod current_weather_extractor;
|
||||
mod current_weather_output;
|
||||
mod current_weather_output_model;
|
||||
mod current_weather_print_params;
|
||||
|
||||
mod ifconfig {
|
||||
pub mod ifconfig_api;
|
||||
}
|
||||
|
||||
mod formats {
|
||||
pub mod data_format;
|
||||
pub mod speed_unit;
|
||||
pub mod temp_unit;
|
||||
}
|
||||
|
||||
mod ip_api {
|
||||
pub mod ip_api_api;
|
||||
pub mod ip_location;
|
||||
pub mod ip_location_cache;
|
||||
}
|
||||
|
||||
mod open_meteo {
|
||||
pub mod current_weather;
|
||||
pub mod open_meteo_api;
|
||||
}
|
||||
|
||||
use billboard::{Alignment, Billboard};
|
||||
use formats::data_format::DataFormat;
|
||||
use ip_api::ip_location_cache::{get_from_cache, save_to_cache};
|
||||
use std::process::exit;
|
||||
use structopt::StructOpt;
|
||||
|
||||
use cli::Arguments;
|
||||
use coords::Coordinates;
|
||||
use current_weather_extractor::CurrentWeatherExtractor;
|
||||
use current_weather_print_params::CurrentWeatherPrintParams;
|
||||
use formats::data_format::DataFormat;
|
||||
use ifconfig::ifconfig_api::extract_public_ip;
|
||||
use ip_api::ip_api_api::extract_coords_and_city;
|
||||
use ip_api::{
|
||||
ip_api_api::extract_coords_and_city,
|
||||
ip_location_cache::{get_from_cache, save_to_cache},
|
||||
};
|
||||
use open_meteo::open_meteo_api::request_current_weather;
|
||||
use std::process::exit;
|
||||
use structopt::StructOpt;
|
||||
|
||||
fn main() {
|
||||
let opts = Arguments::from_args();
|
||||
|
@ -1,7 +1,9 @@
|
||||
use crate::{
|
||||
coords::Coordinates,
|
||||
formats::speed_unit::{speed_to_string, SpeedUnit},
|
||||
formats::temp_unit::{temp_to_string, TempUnit},
|
||||
formats::{
|
||||
speed_unit::{speed_to_string, SpeedUnit},
|
||||
temp_unit::{temp_to_string, TempUnit},
|
||||
},
|
||||
open_meteo::current_weather::CurrentWeather,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user