diff options
| author | ArcaneDev <alive6863@gmail.com> | 2025-03-26 22:38:41 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-26 22:38:41 +0300 |
| commit | d646b8f8508dc9a0d6e6ceee4a9386a448eba839 (patch) | |
| tree | 441e549fcaddd24c534c9b5d005fd19182c64184 /src | |
| parent | d075958732b9deb6a6f39dd1171144e075f013dc (diff) | |
Update parser.rs
Diffstat (limited to 'src')
| -rw-r--r-- | src/parser.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/parser.rs b/src/parser.rs index e97db13..d6b7abd 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -138,6 +138,12 @@ pub fn get_location(coords_args: bool) -> Result<(), BoxedError> { .clone(); if (config.lat == 0.0 || config.lon == 0.0) && !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(<float>)`, `lon(<float>)`."); + println!("HINT: To get more info check https://openweathermap.org/api/one-call-3"); + Err("Invalid coordinates in config".into()) } else { Ok(()) @@ -165,4 +171,4 @@ pub async fn parse_weather() -> Result<WeatherData, Box<dyn std::error::Error>> let weather_data: WeatherData = response.json().await?; Ok(weather_data) -}
\ No newline at end of file +} |
