Skip to content

Commit 92f857a

Browse files
committed
Cargo fmt.
1 parent d548e89 commit 92f857a

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ use sqlx::PgPool;
1717
#[async_trait]
1818
pub trait TileSource: Sized {
1919
/// Renders the Mapbox vector tile for a slippy map tile in XYZ format.
20-
async fn render_mvt(&self, pool: &PgPool, zoom: u8, x: i32, y: i32) -> Result<Vec<u8>, sqlx::Error>;
20+
async fn render_mvt(
21+
&self,
22+
pool: &PgPool,
23+
zoom: u8,
24+
x: i32,
25+
y: i32,
26+
) -> Result<Vec<u8>, sqlx::Error>;
2127
}
2228

2329
pub mod tm2;
@@ -117,4 +123,4 @@ mod tests {
117123
};
118124
assert_approx_eq!(correct_bounds.north, computed_bounds.north);
119125
}
120-
}
126+
}

src/tm2.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use serde::Deserialize;
1010
// TODO: remove once async fn in traits become stable
1111
use async_trait::async_trait;
1212

13-
use sqlx::{query, PgPool, Row, cursor::Cursor};
13+
use sqlx::{cursor::Cursor, query, PgPool, Row};
1414

1515
/// A TileMill (.tm2source) data structure.
1616
///
@@ -118,7 +118,13 @@ impl TM2Source {
118118

119119
#[async_trait]
120120
impl TileSource for TM2Source {
121-
async fn render_mvt(&self, pool: &PgPool, zoom: u8, x: i32, y: i32) -> Result<Vec<u8>, sqlx::Error> {
121+
async fn render_mvt(
122+
&self,
123+
pool: &PgPool,
124+
zoom: u8,
125+
x: i32,
126+
y: i32,
127+
) -> Result<Vec<u8>, sqlx::Error> {
122128
let z: i32 = zoom.into();
123129
let tile_bounds = get_epsg_3857_tile_bounds(self.pixel_scale, zoom, x, y, 0);
124130
let buffer_sizes = self.buffer_sizes();

0 commit comments

Comments
 (0)