Skip to content

Commit 76b7fee

Browse files
committed
fix: revert nested data
1 parent ec2877c commit 76b7fee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn main() {
9292
file.write_all(serde_json::to_string_pretty(&weather).unwrap().as_bytes())
9393
.expect(format!("Unable to write cache file at {}", cachefile).as_str());
9494
}
95-
let current_condition = &weather["data"]["current_condition"][0];
95+
let current_condition = &weather["current_condition"][0];
9696
let nearest_area = &weather["nearest_area"][0];
9797
let feels_like = if args.fahrenheit {
9898
current_condition["FeelsLikeF"].as_str().unwrap()
@@ -191,7 +191,7 @@ fn main() {
191191
let now = Local::now();
192192

193193
let today = Local::now().date_naive();
194-
let mut forecast = weather["data"]["weather"]
194+
let mut forecast = weather["weather"]
195195
.as_array()
196196
.cloned()
197197
.unwrap_or_default();

0 commit comments

Comments
 (0)