Skip to content

Commit

Permalink
fmt and clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkAndshark committed Nov 9, 2023
1 parent 8b7ff70 commit 21b4180
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions mbtiles/src/mbtiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ impl Mbtiles {
{
let file_size =
PathBuf::from(&self.filepath).metadata().unwrap().len() as f64 / 1024.0 / 1024.0;
let page_size = query!("PRAGMA page_size;").fetch_one(&mut *conn).await?.page_size;
let page_size = query!("PRAGMA page_size;")
.fetch_one(&mut *conn)
.await?
.page_size;
let tile_infos_query = query!(
r#"SELECT
zoom_level AS zoom,
Expand Down Expand Up @@ -348,10 +351,10 @@ impl Mbtiles {
average: level_details.iter().map(|l| l.average).sum::<f32>()
/ level_details.len() as f32,
bounding_box: level_details
.iter()
.map(|l|l.bounding_box)
.reduce(|a,b|a+b)
.unwrap(),
.iter()
.map(|l| l.bounding_box)
.reduce(|a, b| a + b)
.unwrap(),
};
level_details.push(details_of_all);
Ok(Statistics {
Expand Down Expand Up @@ -1082,7 +1085,7 @@ mod tests {
- 20037508.360000003
- 20037508.360000003
"###);

Ok(())
}
}

0 comments on commit 21b4180

Please sign in to comment.