From 21b4180a72cef3d8627559764fd95937dc5d296e Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 9 Nov 2023 03:41:11 +0000 Subject: [PATCH] fmt and clippy --- mbtiles/src/mbtiles.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/mbtiles/src/mbtiles.rs b/mbtiles/src/mbtiles.rs index 0e8e13741..a6da930a2 100644 --- a/mbtiles/src/mbtiles.rs +++ b/mbtiles/src/mbtiles.rs @@ -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, @@ -348,10 +351,10 @@ impl Mbtiles { average: level_details.iter().map(|l| l.average).sum::() / 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 { @@ -1082,7 +1085,7 @@ mod tests { - 20037508.360000003 - 20037508.360000003 "###); - + Ok(()) } }