From b582323128df428ebb0a3e49a7cd489c062e819f Mon Sep 17 00:00:00 2001 From: Simon Humpohl Date: Sun, 23 Apr 2023 12:48:24 +0200 Subject: [PATCH] cargo fmt --- maplibre/src/coords.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/maplibre/src/coords.rs b/maplibre/src/coords.rs index 57fef22bf..3d68bcb07 100644 --- a/maplibre/src/coords.rs +++ b/maplibre/src/coords.rs @@ -6,7 +6,7 @@ use std::{ fmt::{Display, Formatter}, }; -use bytemuck_derive::{Zeroable}; +use bytemuck_derive::Zeroable; use cgmath::{AbsDiffEq, Matrix4, Point3, Vector3}; use serde::{Deserialize, Serialize}; @@ -33,7 +33,7 @@ const MAX_ZOOM: u8 = 30; #[derive(Ord, PartialOrd, Eq, PartialEq, Clone, Copy)] pub struct Quadkey { zoom_level: ZoomLevel, - encoded_coords: u64 + encoded_coords: u64, } impl Quadkey { @@ -43,7 +43,7 @@ impl Quadkey { Self { zoom_level, - encoded_coords + encoded_coords, } } } @@ -61,7 +61,6 @@ impl fmt::Debug for Quadkey { } } - /// Discretized representation of the zoom. Used as a tile coordinate. /// /// Has to be in the range 0..32 @@ -640,11 +639,11 @@ impl ViewRegion { let zoom_level = self.zoom_level; - (min_x..=max_x).flat_map( - move |x| (min_y..=max_y).map( - move |y| WorldTileCoords::from((x, y, zoom_level)) - ) - ).take(self.max_n_tiles) + (min_x..=max_x) + .flat_map(move |x| { + (min_y..=max_y).map(move |y| WorldTileCoords::from((x, y, zoom_level))) + }) + .take(self.max_n_tiles) } }