From 2053f8067c9d6ae62fcf9f3f1247201eefc213ba Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Sat, 21 Oct 2023 18:54:09 -0400 Subject: [PATCH] Provide default Source::support_url_query --- martin/src/mbtiles/mod.rs | 4 ---- martin/src/pmtiles/mod.rs | 4 ---- martin/src/source.rs | 4 +++- martin/src/srv/server.rs | 4 ---- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/martin/src/mbtiles/mod.rs b/martin/src/mbtiles/mod.rs index efbd74c94..1190ffad1 100644 --- a/martin/src/mbtiles/mod.rs +++ b/martin/src/mbtiles/mod.rs @@ -81,10 +81,6 @@ impl Source for MbtSource { Box::new(self.clone()) } - fn support_url_query(&self) -> bool { - false - } - async fn get_tile(&self, xyz: &Xyz, _url_query: &Option) -> Result { if let Some(tile) = self .mbtiles diff --git a/martin/src/pmtiles/mod.rs b/martin/src/pmtiles/mod.rs index 2af8cf9e5..0b678c928 100644 --- a/martin/src/pmtiles/mod.rs +++ b/martin/src/pmtiles/mod.rs @@ -129,10 +129,6 @@ impl Source for PmtSource { Box::new(self.clone()) } - fn support_url_query(&self) -> bool { - false - } - async fn get_tile(&self, xyz: &Xyz, _url_query: &Option) -> Result { // TODO: optimize to return Bytes if let Some(t) = self diff --git a/martin/src/source.rs b/martin/src/source.rs index bc6767120..f78d69d9d 100644 --- a/martin/src/source.rs +++ b/martin/src/source.rs @@ -105,7 +105,9 @@ pub trait Source: Send + Debug { fn clone_source(&self) -> Box; - fn support_url_query(&self) -> bool; + fn support_url_query(&self) -> bool { + false + } async fn get_tile(&self, xyz: &Xyz, query: &Option) -> Result; diff --git a/martin/src/srv/server.rs b/martin/src/srv/server.rs index 6630f4270..e6c740d85 100755 --- a/martin/src/srv/server.rs +++ b/martin/src/srv/server.rs @@ -505,10 +505,6 @@ mod tests { unimplemented!() } - fn support_url_query(&self) -> bool { - unimplemented!() - } - async fn get_tile( &self, _xyz: &Xyz,