Skip to content

Commit 711463e

Browse files
committed
Rename 'value' field to 'threshold' in geojson representation
1 parent a39dc72 commit 711463e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/contour.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,7 @@ impl Contour {
265265
/// ```
266266
pub fn to_geojson(&self) -> geojson::Feature {
267267
let mut properties = geojson::JsonObject::with_capacity(1);
268-
// REVIEW: This maintains existing behavior, but should we rename
269-
// `value` to something more explicable, like `threshold`?
270-
properties.insert("value".to_string(), self.threshold.into());
268+
properties.insert("threshold".to_string(), self.threshold.into());
271269

272270
geojson::Feature {
273271
bbox: None,

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
//! [6., 7.5]
3939
//! ]]],
4040
//! },
41-
//! "properties": {"value": 0.5},
41+
//! "properties": {"threshold": 0.5},
4242
//! });
4343
//!
4444
//! assert_eq!(res[0].to_geojson(), std::convert::TryFrom::try_from(output).unwrap());

0 commit comments

Comments
 (0)