You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not production code, just some experimental code I am playing with. Simplest form is:
#[tokio::main]
async fn main() {
let openweather = OpenWeather::new(
"MY_API_KEY".to_string(),
Units::Imperial,
Language::English,
);
let lat = 45.861409;
let lon = -123.183515;
let response = openweather.one_call.call(lat, lon).await;
println!("{:?}", response.unwrap()); // program panics here with message above
}
Using 0.1.5 of the crate in my dependencies.
Would appreciate any pointers as to what I'm doing wrong...
The text was updated successfully, but these errors were encountered:
One challenge I've had with the OpenWeather API is that not all fields are always present, but their documentation doesn't mark what is nullable. While we could just mark every field as optional, that would get really tedious, as most of them are consistently present.
I've tested it enough that I think I've pinned down the nullable fields, but it's definitely possible "visibility" should be marked as optional. I'm happy to update that if you were able to confirm it was not included in your response.
Hi, I had some code that was working fine until a few days ago, when with no changes the code I started getting:
{ kind: Decode, source: Error("missing field
visibility", line: 1, column: 5505) }
This is not production code, just some experimental code I am playing with. Simplest form is:
Using 0.1.5 of the crate in my dependencies.
Would appreciate any pointers as to what I'm doing wrong...
The text was updated successfully, but these errors were encountered: