Skip to content

Commit

Permalink
Revert "Added convenience wrappers for stringifying geojson (#217)"
Browse files Browse the repository at this point in the history
This reverts commit 3fed23a.
  • Loading branch information
michaelkirk committed Jul 14, 2023
1 parent 3fed23a commit 439c384
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
2 changes: 0 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
* Modified conversion from JSON to reject zero- and one-dimensional positions.
* PR: <https://github.com/georust/geojson/pull/225>

* Added `geojson::{to_string, to_string_pretty}` as convenience wrappers around the same `serde_json` methods.

## 0.24.0

* Added `geojson::{ser, de}` helpers to convert your custom struct to and from GeoJSON.
Expand Down
18 changes: 0 additions & 18 deletions examples/geojson_to_string.rs

This file was deleted.

14 changes: 0 additions & 14 deletions src/geojson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,20 +233,6 @@ impl GeoJson {
{
serde_json::from_reader(rdr)
}

/// Convenience wrapper for [serde_json::to_string()]
pub fn to_string(self) -> Result<String> {
::serde_json::to_string(&self)
.map_err(|err| Error::MalformedJson(err))
.and_then(|s| Ok(s.to_string()))
}

/// Convenience wrapper for [serde_json::to_string_pretty()]
pub fn to_string_pretty(self) -> Result<String> {
::serde_json::to_string_pretty(&self)
.map_err(|err| Error::MalformedJson(err))
.and_then(|s| Ok(s.to_string()))
}
}

impl TryFrom<JsonObject> for GeoJson {
Expand Down

0 comments on commit 439c384

Please sign in to comment.