From 567b25267e4cc43fe64f882a9da024adc9e67f3e Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Thu, 9 Nov 2023 05:53:48 -0700 Subject: [PATCH] fix: remove unused code set-query is gone but we left some cruft. --- stac/src/error.rs | 5 ----- stac/src/link.rs | 10 ---------- 2 files changed, 15 deletions(-) diff --git a/stac/src/error.rs b/stac/src/error.rs index 4e64b6bd..2fe0ecc8 100644 --- a/stac/src/error.rs +++ b/stac/src/error.rs @@ -73,11 +73,6 @@ pub enum Error { #[error(transparent)] SerdeJson(#[from] serde_json::Error), - /// [serde_urlencoded::ser::Error] - #[cfg(feature = "set_query")] - #[error(transparent)] - SerdeUrlencodedSer(#[from] serde_urlencoded::ser::Error), - /// Returned when the `type` field of a STAC object does not equal `"Feature"`, `"Catalog"`, or `"Collection"`. #[error("unknown \"type\": {0}")] UnknownType(String), diff --git a/stac/src/link.rs b/stac/src/link.rs index 84b0db53..28025ed2 100644 --- a/stac/src/link.rs +++ b/stac/src/link.rs @@ -677,16 +677,6 @@ mod tests { assert!(value.get("title").is_none()); } - #[test] - #[cfg(feature = "set_query")] - fn set_query_pair() { - let mut link = Link::new("http://stac-rs.test/an-href", "a-rel"); - link.set_query([("foo", "bar")]).unwrap(); - assert_eq!(link.href, "http://stac-rs.test/an-href?foo=bar"); - link.set_query([("baz", "boz")]).unwrap(); - assert_eq!(link.href, "http://stac-rs.test/an-href?baz=boz"); - } - mod links { use crate::{Catalog, Item, Link, Links};