@@ -217,7 +217,7 @@ impl AsyncPmTilesReader<HttpBackend, NoCache> {
217
217
///
218
218
/// Fails if [url] does not exist or is an invalid archive. (Note: HTTP requests are made to validate it.)
219
219
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
221
221
}
222
222
}
223
223
@@ -227,9 +227,9 @@ impl<C: DirectoryCache + Sync + Send> AsyncPmTilesReader<HttpBackend, C> {
227
227
///
228
228
/// Fails if [url] does not exist or is an invalid archive. (Note: HTTP requests are made to validate it.)
229
229
pub async fn new_with_cached_url < U : IntoUrl > (
230
+ cache : C ,
230
231
client : Client ,
231
232
url : U ,
232
- cache : C ,
233
233
) -> Result < Self , Error > {
234
234
let backend = HttpBackend :: try_from ( client, url) ?;
235
235
@@ -243,7 +243,7 @@ impl AsyncPmTilesReader<MmapBackend, NoCache> {
243
243
///
244
244
/// Fails if [p] does not exist or is an invalid archive.
245
245
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
247
247
}
248
248
}
249
249
@@ -252,7 +252,7 @@ impl<C: DirectoryCache + Sync + Send> AsyncPmTilesReader<MmapBackend, C> {
252
252
/// Creates a new cached PMTiles reader from a file path using the async mmap backend.
253
253
///
254
254
/// 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 > {
256
256
let backend = MmapBackend :: try_from ( path) . await ?;
257
257
258
258
Self :: try_from_cached_source ( backend, cache) . await
0 commit comments