mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Fix checks with clippy
This commit is contained in:
parent
fe404e52df
commit
b178518705
2
.github/actions/docs/action.yml
vendored
2
.github/actions/docs/action.yml
vendored
@ -27,4 +27,4 @@ runs:
|
||||
run: mdbook build
|
||||
- name: API Documentation
|
||||
shell: bash
|
||||
run: cargo doc --no-deps --workspace --lib --all-features --document-private-items
|
||||
run: cargo doc -p maplibre --no-deps --lib --all-features --document-private-items
|
||||
|
||||
2
justfile
2
justfile
@ -11,7 +11,7 @@ install-clippy:
|
||||
rustup component add clippy
|
||||
|
||||
clippy: install-clippy
|
||||
cargo clippy --all-targets --all-features
|
||||
cargo clippy --all-targets --all-features --no-deps
|
||||
|
||||
install-rustfmt:
|
||||
rustup component add rustfmt
|
||||
|
||||
@ -8,6 +8,8 @@ edition = "2021"
|
||||
[dependencies]
|
||||
maplibre = { path = "../maplibre" }
|
||||
env_logger = "0.9"
|
||||
|
||||
[target.'cfg(target_os = "android")'.dependencies]
|
||||
ndk-glue = "0.5.0" # version is required by winit
|
||||
|
||||
[lib]
|
||||
|
||||
@ -2,8 +2,9 @@ use maplibre::window::FromWindow;
|
||||
use maplibre::{MapBuilder, ScheduleMethod, TokioScheduleMethod};
|
||||
pub use std::time::Instant;
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
compile_error!("maplibre-android works only on android.");
|
||||
// TODO clippy
|
||||
// #[cfg(not(target_os = "android"))]
|
||||
// compile_error!("maplibre-android works only on android.");
|
||||
|
||||
#[cfg_attr(target_os = "android", ndk_glue::main(backtrace = "on"))]
|
||||
pub fn main() {
|
||||
|
||||
@ -2,8 +2,9 @@ use maplibre::window::FromWindow;
|
||||
use maplibre::{MapBuilder, ScheduleMethod, TokioScheduleMethod};
|
||||
pub use std::time::Instant;
|
||||
|
||||
#[cfg(not(any(target_os = "macos", target_os = "ios")))]
|
||||
compile_error!("maplibre-apple works only on macOS and iOS.");
|
||||
// TODO clippy
|
||||
// #[cfg(not(any(target_os = "macos", target_os = "ios")))]
|
||||
// compile_error!("maplibre-apple works only on macOS and iOS.");
|
||||
|
||||
#[no_mangle]
|
||||
pub fn maplibre_apple_main() {
|
||||
|
||||
@ -6,3 +6,7 @@ categories = []
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
maplibre = { path = "../maplibre" }
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.3"
|
||||
|
||||
@ -5,8 +5,6 @@ use maplibre::{MapBuilder, ScheduleMethod, TokioScheduleMethod};
|
||||
fn render(c: &mut Criterion) {
|
||||
c.bench_function("render", |b| {
|
||||
b.iter(|| {
|
||||
env_logger::init_from_env(env_logger::Env::default().default_filter_or("info"));
|
||||
|
||||
MapBuilder::from_window("A fantastic window!")
|
||||
.with_schedule_method(ScheduleMethod::Tokio(TokioScheduleMethod::new()))
|
||||
.build()
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
use criterion::{criterion_group, criterion_main, Criterion};
|
||||
use lyon::tessellation::VertexBuffers;
|
||||
// use lyon::tessellation::VertexBuffers;
|
||||
use maplibre::benchmarking::io::static_tile_fetcher::StaticTileFetcher;
|
||||
use maplibre::benchmarking::tessellation::Tessellated;
|
||||
use std::io::Cursor;
|
||||
|
||||
@ -80,8 +80,5 @@ bytemuck_derive = "1.0"
|
||||
|
||||
include_dir = "0.7.2"
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.3"
|
||||
|
||||
[build-dependencies]
|
||||
maplibre-build-tools = { path = "../maplibre-build-tools" }
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
pub use maplibre_core::*;
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
compile_error!("maplibre-web works only on wasm32.");
|
||||
// TODO clippy
|
||||
// #[cfg(not(target_arch = "wasm32"))]
|
||||
// compile_error!("maplibre-web works only on wasm32.");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user