We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
data
1 parent ec2877c commit 76b7feeCopy full SHA for 76b7fee
1 file changed
src/main.rs
@@ -92,7 +92,7 @@ fn main() {
92
file.write_all(serde_json::to_string_pretty(&weather).unwrap().as_bytes())
93
.expect(format!("Unable to write cache file at {}", cachefile).as_str());
94
}
95
- let current_condition = &weather["data"]["current_condition"][0];
+ let current_condition = &weather["current_condition"][0];
96
let nearest_area = &weather["nearest_area"][0];
97
let feels_like = if args.fahrenheit {
98
current_condition["FeelsLikeF"].as_str().unwrap()
@@ -191,7 +191,7 @@ fn main() {
191
let now = Local::now();
192
193
let today = Local::now().date_naive();
194
- let mut forecast = weather["data"]["weather"]
+ let mut forecast = weather["weather"]
195
.as_array()
196
.cloned()
197
.unwrap_or_default();
0 commit comments