Skip to content

Commit

Permalink
Update src/async_reader.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Luke Seelenbinder <[email protected]>
  • Loading branch information
nyurik and lseelenbinder committed Nov 10, 2023
1 parent eb0a896 commit 84cdfd0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/async_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ impl<B: AsyncBackend + Sync + Send> AsyncPmTilesReader<B> {

/// Recursively locates a tile in the archive.
async fn find_tile_entry(&self, tile_id: u64) -> Option<Entry> {
let entry = self.root_directory.find_tile_id(tile_id);
if let Some(entry) = entry {
if entry.is_leaf() {
return self.find_entry_rec(tile_id, entry, 0).await;
}
let entry = self.root_directory.find_tile_id(tile_id)?;
if entry.is_leaf() {
self.find_entry_rec(tile_id, entry, 0).await
} else {
entry
}
entry.cloned()
.cloned()
}

#[async_recursion]
Expand Down

0 comments on commit 84cdfd0

Please sign in to comment.