From e687e9bd48ce383894fd499595fc25c2dd8ca024 Mon Sep 17 00:00:00 2001 From: Namilskyy Date: Tue, 25 Mar 2025 22:20:05 +0300 Subject: Fixed errors and bugs. --- src/main.rs | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 568ef9a..4f15b56 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,19 +1,5 @@ -//In developing 🏗️ - -use serde::{Serialize, Deserialize}; -use std::{env, path::Path}; -use clap::{Arg, Command}; -use termimage::{Image}; - -mod parser; -mod configmanager; - -use parser::{parse_weather, Weather}; -use configmanager::{Config, handle_config}; - -f// main.rs use clap::{Arg, Command}; -use termimage::Image; +use termimage; mod configmanager; mod parser; @@ -24,13 +10,10 @@ fn main() -> Result<(), Box> { let matches = Command::new("WeatherFetch") .version("0.1") .author("Borisov Alexey ") - .about("Weather fetch like fastfetch with image and ASCII art support") + .about("Weather fetch with image and ASCII art support") .arg(Arg::new("image").short('i').long("image").value_name("PATH")) - .arg(Arg::new("exclude") - .short('e') - .long("exclude") - .value_name("TYPE") - .possible_values(["current", "minutely", "hourly", "daily", "alerts"])) + .arg(Arg::new("exclude").short('e').long("exclude").value_name("TYPE") + .value_parser(["current", "minutely", "hourly", "daily", "alerts"])) .arg(Arg::new("help").short('h').long("help")) .arg(Arg::new("lat").short('t').long("lat").value_name("LATITUDE")) .arg(Arg::new("lon").short('n').long("lon").value_name("LONGITUDE")) -- cgit v1.2.3