Skip to content

Commit

Permalink
fix: forced ipinfo to return json
Browse files Browse the repository at this point in the history
  • Loading branch information
arihant2math authored Jul 13, 2024
1 parent 5d98e71 commit 9fed54c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/local/src/location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ fn get_windows() -> Result<Coordinates, CoordinateError> {
}

fn get_web() -> Result<Coordinates, CoordinateError> {
let mut resp = networking::get!("https://ipinfo.io")?.text;
let mut resp = networking::get!("https://ipinfo.io/json")?.text;
let json: HashMap<String, String> = unsafe { simd_json::from_str(&mut resp)? };
let location_vec: Vec<&str> = json
.get("loc")
Expand Down

0 comments on commit 9fed54c

Please sign in to comment.