Skip to content

Commit 9cd05c8

Browse files
committed
reorder params
1 parent 3cd82a8 commit 9cd05c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/async_reader.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl AsyncPmTilesReader<HttpBackend, NoCache> {
217217
///
218218
/// Fails if [url] does not exist or is an invalid archive. (Note: HTTP requests are made to validate it.)
219219
pub async fn new_with_url<U: IntoUrl>(client: Client, url: U) -> Result<Self, Error> {
220-
Self::new_with_cached_url(client, url, NoCache).await
220+
Self::new_with_cached_url(NoCache, client, url).await
221221
}
222222
}
223223

@@ -227,9 +227,9 @@ impl<C: DirectoryCache + Sync + Send> AsyncPmTilesReader<HttpBackend, C> {
227227
///
228228
/// Fails if [url] does not exist or is an invalid archive. (Note: HTTP requests are made to validate it.)
229229
pub async fn new_with_cached_url<U: IntoUrl>(
230+
cache: C,
230231
client: Client,
231232
url: U,
232-
cache: C,
233233
) -> Result<Self, Error> {
234234
let backend = HttpBackend::try_from(client, url)?;
235235

@@ -243,7 +243,7 @@ impl AsyncPmTilesReader<MmapBackend, NoCache> {
243243
///
244244
/// Fails if [p] does not exist or is an invalid archive.
245245
pub async fn new_with_path<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
246-
Self::new_with_cached_path(path, NoCache).await
246+
Self::new_with_cached_path(NoCache, path).await
247247
}
248248
}
249249

@@ -252,7 +252,7 @@ impl<C: DirectoryCache + Sync + Send> AsyncPmTilesReader<MmapBackend, C> {
252252
/// Creates a new cached PMTiles reader from a file path using the async mmap backend.
253253
///
254254
/// Fails if [p] does not exist or is an invalid archive.
255-
pub async fn new_with_cached_path<P: AsRef<Path>>(path: P, cache: C) -> Result<Self, Error> {
255+
pub async fn new_with_cached_path<P: AsRef<Path>>(cache: C, path: P) -> Result<Self, Error> {
256256
let backend = MmapBackend::try_from(path).await?;
257257

258258
Self::try_from_cached_source(backend, cache).await

0 commit comments

Comments
 (0)