From c214e1c59e54b895e32c332afc6bb8e897b01d0e Mon Sep 17 00:00:00 2001 From: Namilskyy Date: Wed, 26 Mar 2025 14:49:15 +0300 Subject: Fixing errs --- src/parser.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/parser.rs') diff --git a/src/parser.rs b/src/parser.rs index e8eff39..5a670b1 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -2,7 +2,7 @@ use reqwest::{Error, Client, get}; use chrono::{DateTime, Utc, prelude::*}; use serde::{Serialize, Deserialize}; -use crate::configmanager::{Config}; +use crate::configmanager; //API answer struct`s #[derive(Debug, Serialize, Deserialize)] @@ -125,10 +125,10 @@ pub struct Alert { -pub fn get_location(let coords_args: bool, config: &Config) -> Result<(), String>{ +pub fn get_location(coords_args: bool) -> Result<(), String>{ //Get the lat and lon for API call - configmanager::handle_config(); - if Config.lat.is_empty() || Config.lon.is_empty() && !coords_args{ + let conf: Option; + if conf.lat.is_empty() || conf.lon.is_empty() && !coords_args{ println!("No coordinates in configuration file or conf not founded."); println!("HINT: Try create ~/.config/WeatherFetch/Config.toml"); println!("HINT: And add `lat()`, `lon()`."); -- cgit v1.2.3