From 23037eb7ee6c84072c31e3077f4cf6735d326aca Mon Sep 17 00:00:00 2001 From: WanderingPenwing Date: Tue, 22 Oct 2024 10:28:15 +0200 Subject: [PATCH] fixed date warning --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 48cb546..a3e0c40 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,12 +59,12 @@ async fn main() { let weather_result = weather_client.forecast() .query(Query::City("Toulouse".to_string())) .days(2) - .dt(Utc.ymd(2022, 08, 21).and_hms(0, 0, 0)) + .dt(Utc.with_ymd_and_hms(2022, 08, 21, 0, 0, 0).unwrap()) .lang(Language::French) .call(); let weather_str : String = if let Ok(ref forecast) = weather_result { - //println!("code : {}", forecast.current.condition.code); + println!("code : {}", forecast.current.condition.code); weather_code_to_icon(forecast.current.condition.code) } else { " ".into()