From 7667c8f231a0336d2c37114af54e01703f9309d8 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Wed, 10 Apr 2024 17:05:29 -0400 Subject: [PATCH 1/2] Use built-in async recursion --- Cargo.toml | 3 +-- src/async_reader.rs | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 22beac4..52973a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0" description = "Implementation of the PMTiles v3 spec with multiple sync and async backends." repository = "https://github.com/stadiamaps/pmtiles-rs" keywords = ["pmtiles", "gis", "geo"] -rust-version = "1.75.0" +rust-version = "1.77.0" categories = ["science::geo"] [features] @@ -34,7 +34,6 @@ __async-s3-rustls = ["rust-s3?/tokio-rustls-tls"] [dependencies] # TODO: determine how we want to handle compression in async & sync environments async-compression = { version = "0.4", features = ["gzip", "zstd", "brotli"] } -async-recursion = "1" bytes = "1" fmmap = { version = "0.3", default-features = false, optional = true } hilbert_2d = "1" diff --git a/src/async_reader.rs b/src/async_reader.rs index 170a71d..099bb36 100644 --- a/src/async_reader.rs +++ b/src/async_reader.rs @@ -4,7 +4,6 @@ use std::future::Future; -use async_recursion::async_recursion; use bytes::Bytes; #[cfg(feature = "__async")] use tokio::io::AsyncReadExt; @@ -149,7 +148,6 @@ impl AsyncPmTile Ok(entry.cloned()) } - #[async_recursion] async fn find_entry_rec( &self, tile_id: u64, @@ -176,7 +174,7 @@ impl AsyncPmTile if let Some(ref entry) = entry { if entry.is_leaf() { return if depth <= 4 { - self.find_entry_rec(tile_id, entry, depth + 1).await + Box::pin(self.find_entry_rec(tile_id, entry, depth + 1)).await } else { Ok(None) }; From 30ac4091172ef70268536823e6f67ca44f3b393c Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Thu, 2 May 2024 13:37:54 -0400 Subject: [PATCH 2/2] Bump version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 52973a2..b23d78a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pmtiles" -version = "0.9.0" +version = "0.10.0" edition = "2021" authors = ["Luke Seelenbinder "] license = "MIT OR Apache-2.0"