From 9cd05c8a58ebd430cd62654a7a78c12b494850b4 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Thu, 9 Nov 2023 20:38:48 -0500 Subject: [PATCH] reorder params --- src/async_reader.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/async_reader.rs b/src/async_reader.rs index db1733e..0843249 100644 --- a/src/async_reader.rs +++ b/src/async_reader.rs @@ -217,7 +217,7 @@ impl AsyncPmTilesReader { /// /// Fails if [url] does not exist or is an invalid archive. (Note: HTTP requests are made to validate it.) pub async fn new_with_url(client: Client, url: U) -> Result { - Self::new_with_cached_url(client, url, NoCache).await + Self::new_with_cached_url(NoCache, client, url).await } } @@ -227,9 +227,9 @@ impl AsyncPmTilesReader { /// /// Fails if [url] does not exist or is an invalid archive. (Note: HTTP requests are made to validate it.) pub async fn new_with_cached_url( + cache: C, client: Client, url: U, - cache: C, ) -> Result { let backend = HttpBackend::try_from(client, url)?; @@ -243,7 +243,7 @@ impl AsyncPmTilesReader { /// /// Fails if [p] does not exist or is an invalid archive. pub async fn new_with_path>(path: P) -> Result { - Self::new_with_cached_path(path, NoCache).await + Self::new_with_cached_path(NoCache, path).await } } @@ -252,7 +252,7 @@ impl AsyncPmTilesReader { /// Creates a new cached PMTiles reader from a file path using the async mmap backend. /// /// Fails if [p] does not exist or is an invalid archive. - pub async fn new_with_cached_path>(path: P, cache: C) -> Result { + pub async fn new_with_cached_path>(cache: C, path: P) -> Result { let backend = MmapBackend::try_from(path).await?; Self::try_from_cached_source(backend, cache).await