mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Run clippy
This commit is contained in:
parent
a4d6469c47
commit
44fe6b7d5b
@ -1,7 +1,6 @@
|
||||
use criterion::{criterion_group, criterion_main, Criterion};
|
||||
use lyon::tessellation::VertexBuffers;
|
||||
use mapr::benchmarking::io::static_tile_fetcher::StaticTileFetcher;
|
||||
use mapr::benchmarking::io::{HttpFetcherConfig, TileFetcher};
|
||||
use mapr::benchmarking::tessellation::Tessellated;
|
||||
use std::io::Cursor;
|
||||
use vector_tile::parse_tile_reader;
|
||||
@ -16,7 +15,7 @@ fn tile1(c: &mut Criterion) {
|
||||
const MUNICH_Y: u32 = 11365;
|
||||
const MUNICH_Z: u8 = 15;
|
||||
|
||||
let fetcher = StaticTileFetcher::new(HttpFetcherConfig::default());
|
||||
let fetcher = StaticTileFetcher::new();
|
||||
let tile = parse_tile_reader(&mut Cursor::new(
|
||||
fetcher
|
||||
.sync_fetch_tile(&(MUNICH_X, MUNICH_Y, MUNICH_Z).into())
|
||||
|
||||
@ -16,15 +16,15 @@ impl StaticTileFetcher {
|
||||
concat!(env!("OUT_DIR"), "/extracted-tiles")
|
||||
}
|
||||
|
||||
fn new() -> Self {
|
||||
pub fn new() -> Self {
|
||||
Self {}
|
||||
}
|
||||
|
||||
async fn fetch_tile(&self, coords: &TileCoords) -> Result<Vec<u8>, Error> {
|
||||
pub async fn fetch_tile(&self, coords: &TileCoords) -> Result<Vec<u8>, Error> {
|
||||
self.sync_fetch_tile(coords)
|
||||
}
|
||||
|
||||
fn sync_fetch_tile(&self, coords: &TileCoords) -> Result<Vec<u8>, Error> {
|
||||
pub fn sync_fetch_tile(&self, coords: &TileCoords) -> Result<Vec<u8>, Error> {
|
||||
if TILES.entries().is_empty() {
|
||||
error!(
|
||||
"There are not tiles statically embedded in this binary! StaticTileFetcher will \
|
||||
@ -44,7 +44,6 @@ mod tests {
|
||||
use style_spec::source::TileAdressingScheme;
|
||||
|
||||
use crate::coords::WorldTileCoords;
|
||||
use crate::io::{HttpFetcherConfig, TileFetcher};
|
||||
|
||||
use super::StaticTileFetcher;
|
||||
|
||||
@ -54,7 +53,7 @@ mod tests {
|
||||
const MUNICH_Y: i32 = 11365;
|
||||
const MUNICH_Z: u8 = 15;
|
||||
|
||||
let fetcher = StaticTileFetcher::new(HttpFetcherConfig::default());
|
||||
let fetcher = StaticTileFetcher::new();
|
||||
assert!(fetcher.fetch_tile(&(0, 0, 0).into()).await.is_err()); // World overview
|
||||
let world_tile: WorldTileCoords = (MUNICH_X, MUNICH_Y, MUNICH_Z).into();
|
||||
assert!(fetcher
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user