Skip to content

Commit

Permalink
fix: removed remaining debug println!
Browse files Browse the repository at this point in the history
  • Loading branch information
leontoeides committed Jan 10, 2025
1 parent 6f5350b commit a860336
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
* Release notes are available on
[GitHub](https://github.com/leontoeides/google_maps/releases).

# 3.8.1

* 2024-01-10: A debug `println!` was accidentally left in the `Client`
`get_request` method. This has been removed.

# 3.8.0

* Important note: This release some changes that are theoretically breaking
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ responding but I will respond. Thanks!
# Roadmap

- [ ] Track both _requests_ and request _elements_ for rate limiting.
- [ ] Make a generic `get()` function for that can be used by all APIs.
- [ ] Convert explicit query validation to session types wherever reasonable.
- [ ] [Places API](https://developers.google.com/places/web-service/intro). Only
partly implemented. If you would like to have any missing pieces implemented,
Expand Down
13 changes: 8 additions & 5 deletions src/client/get_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ impl crate::Client {
// using the URL and query string:
Ok(request) => match self.reqwest_client.execute(request).await {
Ok(response) => if response.status().is_success() {
let text = response.text().await?;
println!("{text:#?}");
let mut bytes = text.into_bytes();
match simd_json::serde::from_slice::<RSP>(&mut bytes) {
match response.text().await.map(String::into_bytes) {
Ok(mut bytes) => match simd_json::serde::from_slice::<RSP>(&mut bytes) {
Ok(deserialized) => {
let result: Result<RSP, ERR> = deserialized.into();
if let Err(error) = &result {
Expand All @@ -83,7 +81,12 @@ impl crate::Client {
tracing::error!("JSON deserialization error: {error}");
Err(Error::from(error))
},
}
}, // Ok
Err(error) => {
tracing::error!("HTTP request error: {error}");
Err(Error::from(error))
},
} // match
} else {
tracing::error!(
"Google Maps API HTTP request was not successful: {status}",
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
//!
//! ### Google Maps Client Feature Flags:
//!
//! * `address_validation` ‧ includes Google Maps Address Validation API
//! * `autocomplete` ‧ includes Google Maps Places autocomplete API
//! * `directions` ‧ includes Google Maps Directions API
//! * `distance_matrix` ‧ includes Google Maps Distance Matrix API
Expand Down

0 comments on commit a860336

Please sign in to comment.