Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
terrorfisch committed Apr 23, 2023
1 parent b22edec commit b582323
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions maplibre/src/coords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand All @@ -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 {
Expand All @@ -43,7 +43,7 @@ impl Quadkey {

Self {
zoom_level,
encoded_coords
encoded_coords,
}
}
}
Expand All @@ -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
Expand Down Expand Up @@ -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)
}
}

Expand Down

0 comments on commit b582323

Please sign in to comment.