[INFO] cloning repository https://github.com/tomsjansons/moto-router [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/tomsjansons/moto-router" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftomsjansons%2Fmoto-router", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftomsjansons%2Fmoto-router'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 640981b270209e7f5054097aeef6acd72c7918f9 [INFO] linting tomsjansons/moto-router against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftomsjansons%2Fmoto-router" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-1-tc1/source/rust-toolchain.toml [INFO] started tweaking git repo https://github.com/tomsjansons/moto-router [INFO] finished tweaking git repo https://github.com/tomsjansons/moto-router [INFO] tweaked toml for git repo https://github.com/tomsjansons/moto-router written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/tomsjansons/moto-router on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/tomsjansons/moto-router already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded typeshare v1.0.4 [INFO] [stderr] Downloaded geo-traits v0.3.0 [INFO] [stderr] Downloaded typeshare-annotation v1.0.4 [INFO] [stderr] Downloaded static_vcruntime v2.0.0 [INFO] [stderr] Downloaded sql-builder v3.1.1 [INFO] [stderr] Downloaded derive-name v1.1.0 [INFO] [stderr] Downloaded include_directory v0.1.1 [INFO] [stderr] Downloaded par-map v0.1.4 [INFO] [stderr] Downloaded pub-iterator-type v0.1.1 [INFO] [stderr] Downloaded derive-name-macros v1.1.1 [INFO] [stderr] Downloaded include_directory_macros v0.1.0 [INFO] [stderr] Downloaded kdtree v0.7.0 [INFO] [stderr] Downloaded hdbscan v0.10.0 [INFO] [stderr] Downloaded arrow-row v55.1.0 [INFO] [stderr] Downloaded new_mime_guess v4.0.4 [INFO] [stderr] Downloaded clap v4.5.24 [INFO] [stderr] Downloaded comfy-table v7.1.3 [INFO] [stderr] Downloaded arrow-cast v55.1.0 [INFO] [stderr] Downloaded arrow v55.1.0 [INFO] [stderr] Downloaded interprocess v2.2.2 [INFO] [stderr] Downloaded clap_builder v4.5.24 [INFO] [stderr] Downloaded gpx v0.10.0 [INFO] [stderr] Downloaded wkt v0.14.0 [INFO] [stderr] Downloaded protobuf-codegen-pure v2.28.0 [INFO] [stderr] Downloaded arrow-buffer v55.1.0 [INFO] [stderr] Downloaded arrow-data v55.1.0 [INFO] [stderr] Downloaded arrow-array v55.1.0 [INFO] [stderr] Downloaded arrow-schema v55.1.0 [INFO] [stderr] Downloaded arrow-select v55.1.0 [INFO] [stderr] Downloaded arrow-arith v55.1.0 [INFO] [stderr] Downloaded arrow-ord v55.1.0 [INFO] [stderr] Downloaded tar v0.4.43 [INFO] [stderr] Downloaded protobuf-codegen v2.28.0 [INFO] [stderr] Downloaded arrow-string v55.1.0 [INFO] [stderr] Downloaded json-tools v1.1.3 [INFO] [stderr] Downloaded osmpbfreader v0.16.1 [INFO] [stderr] Downloaded postgres-protocol v0.6.8 [INFO] [stderr] Downloaded postgres-types v0.2.9 [INFO] [stderr] Downloaded tokio-postgres v0.7.13 [INFO] [stderr] Downloaded postgres v0.19.10 [INFO] [stderr] Downloaded flat_map v0.0.10 [INFO] [stderr] Downloaded duckdb v1.3.0 [INFO] [stderr] Downloaded libduckdb-sys v1.3.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 7234f027404d1ebbd25cace2615fc666b2e7fbce679fdbd3ebcf2a445c3e774a [INFO] running `Command { std: "docker" "start" "-a" "7234f027404d1ebbd25cace2615fc666b2e7fbce679fdbd3ebcf2a445c3e774a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7234f027404d1ebbd25cace2615fc666b2e7fbce679fdbd3ebcf2a445c3e774a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7234f027404d1ebbd25cace2615fc666b2e7fbce679fdbd3ebcf2a445c3e774a", kill_on_drop: false }` [INFO] [stdout] 7234f027404d1ebbd25cace2615fc666b2e7fbce679fdbd3ebcf2a445c3e774a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8a6e316ef61bc3cb3638d8d4f26bc0e86769bab7baa54009c9add96c87cdbdd4 [INFO] running `Command { std: "docker" "start" "-a" "8a6e316ef61bc3cb3638d8d4f26bc0e86769bab7baa54009c9add96c87cdbdd4", kill_on_drop: false }` [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Checking once_cell v1.20.2 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Checking either v1.13.0 [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Compiling libm v0.2.11 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling serde v1.0.217 [INFO] [stderr] Compiling typenum v1.17.0 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Compiling protobuf v2.28.0 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Compiling rayon-core v1.12.1 [INFO] [stderr] Compiling syn v2.0.95 [INFO] [stderr] Compiling heapless v0.8.0 [INFO] [stderr] Checking subtle v2.6.1 [INFO] [stderr] Checking hash32 v0.3.1 [INFO] [stderr] Checking stable_deref_trait v1.2.0 [INFO] [stderr] Checking itoa v1.0.14 [INFO] [stderr] Checking tinyvec v1.8.1 [INFO] [stderr] Checking bytes v1.9.0 [INFO] [stderr] Checking log v0.4.22 [INFO] [stderr] Compiling thiserror v1.0.69 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Compiling ahash v0.8.11 [INFO] [stderr] Checking unicode-bidi v0.3.18 [INFO] [stderr] Checking unicode-properties v0.1.3 [INFO] [stderr] Checking cpufeatures v0.2.16 [INFO] [stderr] Checking futures-sink v0.3.31 [INFO] [stderr] Checking ryu v1.0.18 [INFO] [stderr] Checking tracing-core v0.1.33 [INFO] [stderr] Compiling serde_json v1.0.135 [INFO] [stderr] Compiling new_mime_guess v4.0.4 [INFO] [stderr] Compiling parking_lot_core v0.9.11 [INFO] [stderr] Checking siphasher v1.0.1 [INFO] [stderr] Checking fallible-iterator v0.2.0 [INFO] [stderr] Checking utf8parse v0.2.2 [INFO] [stderr] Compiling smartstring v1.0.1 [INFO] [stderr] Compiling rustix v0.38.43 [INFO] [stderr] Checking anstyle-parse v0.2.6 [INFO] [stderr] Checking powerfmt v0.2.0 [INFO] [stderr] Checking phf_shared v0.11.3 [INFO] [stderr] Checking anstyle v1.0.10 [INFO] [stderr] Checking is_terminal_polyfill v1.70.1 [INFO] [stderr] Checking adler2 v2.0.0 [INFO] [stderr] Checking futures v0.1.31 [INFO] [stderr] Checking colorchoice v1.0.3 [INFO] [stderr] Checking anstyle-query v1.1.2 [INFO] [stderr] Checking phf v0.11.3 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Checking miniz_oxide v0.8.2 [INFO] [stderr] Checking deranged v0.3.11 [INFO] [stderr] Checking anstream v0.6.18 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Checking itertools v0.11.0 [INFO] [stderr] Checking crc32fast v1.4.2 [INFO] [stderr] Checking linux-raw-sys v0.4.15 [INFO] [stderr] Checking crossbeam-deque v0.8.6 [INFO] [stderr] Compiling static_vcruntime v2.0.0 [INFO] [stderr] Checking unicode-normalization v0.1.24 [INFO] [stderr] Checking strsim v0.11.1 [INFO] [stderr] Checking time-core v0.1.2 [INFO] [stderr] Checking clap_lex v0.7.4 [INFO] [stderr] Checking pub-iterator-type v0.1.1 [INFO] [stderr] Checking bitflags v2.6.0 [INFO] [stderr] Compiling schemars v0.8.21 [INFO] [stderr] Checking iana-time-zone v0.1.61 [INFO] [stderr] Checking whoami v1.6.0 [INFO] [stderr] Checking i_tree v0.8.3 [INFO] [stderr] Checking overload v0.1.1 [INFO] [stderr] Checking num-conv v0.1.0 [INFO] [stderr] Checking robust v1.1.0 [INFO] [stderr] Checking i_key_sort v0.2.0 [INFO] [stderr] Checking nu-ansi-term v0.46.0 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking rstar v0.12.2 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Checking time v0.3.37 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Compiling anyhow v1.0.95 [INFO] [stderr] Checking flate2 v1.0.35 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking clap_builder v4.5.24 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking sha2 v0.10.8 [INFO] [stderr] Checking stringprep v0.1.5 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Checking futures-cpupool v0.1.8 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Compiling thiserror v2.0.11 [INFO] [stderr] Compiling include_directory_macros v0.1.0 [INFO] [stderr] Compiling ridi-router v0.8.6 (/opt/rustwide/workdir) [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking tokio v1.45.1 [INFO] [stderr] Checking par-map v0.1.4 [INFO] [stderr] Checking earcutr v0.4.3 [INFO] [stderr] Checking csv-core v0.1.11 [INFO] [stderr] Checking geographiclib-rs v0.2.4 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking thread_local v1.1.8 [INFO] [stderr] Checking self_cell v1.1.0 [INFO] [stderr] Checking mime v0.3.17 [INFO] [stderr] Checking dyn-clone v1.0.17 [INFO] [stderr] Checking float_next_after v1.0.0 [INFO] [stderr] Checking xml-rs v0.8.25 [INFO] [stderr] Compiling doctest-file v1.0.0 [INFO] [stderr] Checking wait-timeout v0.2.0 [INFO] [stderr] Checking fnv v1.0.7 [INFO] [stderr] Checking quick-error v1.2.3 [INFO] [stderr] Checking json-tools v1.1.3 [INFO] [stderr] Checking include_directory v0.1.1 [INFO] [stderr] Checking interprocess v2.2.2 [INFO] [stderr] Checking tempfile v3.15.0 [INFO] [stderr] Checking rusty-fork v0.3.0 [INFO] [stderr] Compiling serde_derive_internals v0.29.1 [INFO] [stderr] Compiling serde_derive v1.0.217 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling async-trait v0.1.88 [INFO] [stderr] Compiling tracing-attributes v0.1.28 [INFO] [stderr] Compiling typeshare-annotation v1.0.4 [INFO] [stderr] Compiling derive-name-macros v1.1.1 [INFO] [stderr] Compiling struct-field-names-as-array-derive v0.3.0 [INFO] [stderr] Compiling thiserror-impl v2.0.11 [INFO] [stderr] Compiling clap_derive v4.5.24 [INFO] [stderr] Checking derive-name v1.1.0 [INFO] [stderr] Checking geo-types v0.7.16 [INFO] [stderr] Checking struct-field-names-as-array v0.3.0 [INFO] [stderr] Compiling schemars_derive v0.8.21 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking geo-traits v0.3.0 [INFO] [stderr] Compiling protobuf-codegen v2.28.0 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking kdtree v0.7.0 [INFO] [stderr] Checking wkt v0.14.0 [INFO] [stderr] Checking gpx v0.10.0 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking tokio-util v0.7.15 [INFO] [stderr] Checking hdbscan v0.10.0 [INFO] [stderr] Compiling protobuf-codegen-pure v2.28.0 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Checking clap v4.5.24 [INFO] [stderr] Checking spade v2.12.1 [INFO] [stderr] Compiling osmpbfreader v0.16.1 [INFO] [stderr] Checking postgres-protocol v0.6.8 [INFO] [stderr] Checking postgres-types v0.2.9 [INFO] [stderr] Checking tokio-postgres v0.7.13 [INFO] [stderr] Checking i_float v1.7.0 [INFO] [stderr] Checking tracing-serde v0.2.0 [INFO] [stderr] Checking flat_map v0.0.10 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking csv v1.3.1 [INFO] [stderr] Checking i_shape v1.7.0 [INFO] [stderr] Checking i_overlay v2.0.5 [INFO] [stderr] Checking postgres v0.19.10 [INFO] [stderr] Checking tracing-subscriber v0.3.19 [INFO] [stderr] Checking typeshare v1.0.4 [INFO] [stderr] Checking geo v0.30.0 [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/router/generator.rs:11:15 [INFO] [stdout] | [INFO] [stdout] 11 | use tracing::{error, info, trace}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/router/generator.rs:25:36 [INFO] [stdout] | [INFO] [stdout] 25 | pub const WP_LOOKUP_ALLOWED_HWS: [&'static str; 6] = [ [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `error` [INFO] [stdout] --> src/router/generator.rs:11:15 [INFO] [stdout] | [INFO] [stdout] 11 | use tracing::{error, info, trace}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/router/generator.rs:25:36 [INFO] [stdout] | [INFO] [stdout] 25 | pub const WP_LOOKUP_ALLOWED_HWS: [&'static str; 6] = [ [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/router/route/mod.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | pub struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/debug/writer.rs:216:45 [INFO] [stdout] | [INFO] [stdout] 216 | pub fn get_metadata_file_path(dir_name: &PathBuf) -> PathBuf { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 216 ~ pub fn get_metadata_file_path(dir_name: &Path) -> PathBuf { [INFO] [stdout] 217 ~ let mut metadata_file = dir_name.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/debug/writer.rs:271:28 [INFO] [stdout] | [INFO] [stdout] 271 | discarded_choices: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 271 - discarded_choices: &Vec, [INFO] [stdout] 271 + discarded_choices: &[MapDataPointRef], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/gpx_writer.rs:3:54 [INFO] [stdout] | [INFO] [stdout] 3 | use std::{collections::HashMap, fs::File, io::Error, isize, path::PathBuf}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `isize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/gpx_writer.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | gpx.version = GpxVersion::Gpx11; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `gpx::Gpx { version: GpxVersion::Gpx11, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/gpx_writer.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | let mut gpx = Gpx::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ipc_handler.rs:169:68 [INFO] [stdout] | [INFO] [stdout] 169 | let request_message: RequestMessage = serde_json::from_str(&string_message) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `string_message` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/map_data/graph.rs:454:24 [INFO] [stdout] | [INFO] [stdout] 454 | return ALLOWED_HIGHWAY_VALUES.contains(&highway.as_str()) [INFO] [stdout] | ________________________^ [INFO] [stdout] 455 | | && (highway != "path" || (highway == "path" && motorcycle)); [INFO] [stdout] | |_______________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 454 - return ALLOWED_HIGHWAY_VALUES.contains(&highway.as_str()) [INFO] [stdout] 455 - && (highway != "path" || (highway == "path" && motorcycle)); [INFO] [stdout] 454 + return !(!ALLOWED_HIGHWAY_VALUES.contains(&highway.as_str()) || highway == "path" && !motorcycle); [INFO] [stdout] | [INFO] [stdout] 454 - return ALLOWED_HIGHWAY_VALUES.contains(&highway.as_str()) [INFO] [stdout] 455 - && (highway != "path" || (highway == "path" && motorcycle)); [INFO] [stdout] 454 + return (motorcycle || highway != "path") && ALLOWED_HIGHWAY_VALUES.contains(&highway.as_str()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/map_data/graph.rs:455:24 [INFO] [stdout] | [INFO] [stdout] 455 | && (highway != "path" || (highway == "path" && motorcycle)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 455 - && (highway != "path" || (highway == "path" && motorcycle)); [INFO] [stdout] 455 + && !(highway == "path" && !motorcycle); [INFO] [stdout] | [INFO] [stdout] 455 - && (highway != "path" || (highway == "path" && motorcycle)); [INFO] [stdout] 455 + && highway != "path" || motorcycle; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/map_data/graph.rs:575:26 [INFO] [stdout] | [INFO] [stdout] 575 | members: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 575 - members: &Vec, [INFO] [stdout] 575 + members: &[OsmRelationMember], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/map_data/graph.rs:690:30 [INFO] [stdout] | [INFO] [stdout] 690 | let closest_points = match closest_points { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 691 | | Some(p) => p, [INFO] [stdout] 692 | | None => return None, [INFO] [stdout] 693 | | }; [INFO] [stdout] | |_________^ help: try instead: `closest_points?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/map_data/graph.rs:696:32 [INFO] [stdout] | [INFO] [stdout] 696 | let check_limit_tags = limit_to_hw_tags.as_ref().map_or(false, |limit_tags| { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 697 | | limit_tags [INFO] [stdout] 698 | | .iter() [INFO] [stdout] 699 | | .any(|limit_tag| !avoid_tags.contains(&AvoidTag::Highway(limit_tag.to_string()))) [INFO] [stdout] 700 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 696 - let check_limit_tags = limit_to_hw_tags.as_ref().map_or(false, |limit_tags| { [INFO] [stdout] 696 + let check_limit_tags = limit_to_hw_tags.as_ref().is_some_and(|limit_tags| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/map_data/osm.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | tags.get("oneway").map_or(false, |one_way| one_way == "yes") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 22 - tags.get("oneway").map_or(false, |one_way| one_way == "yes") [INFO] [stdout] 22 + tags.get("oneway").is_some_and(|one_way| one_way == "yes") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/map_data/osm.rs:23:20 [INFO] [stdout] | [INFO] [stdout] 23 | || tags [INFO] [stdout] | ____________________^ [INFO] [stdout] 24 | | .get("junction") [INFO] [stdout] 25 | | .map_or(false, |junction| junction == "roundabout") [INFO] [stdout] | |_______________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 25 - .map_or(false, |junction| junction == "roundabout") [INFO] [stdout] 25 + .is_some_and(|junction| junction == "roundabout") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/map_data/osm.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | / tags.get("junction") [INFO] [stdout] 34 | | .map_or(false, |junction| junction == "roundabout") [INFO] [stdout] | |___________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 34 - .map_or(false, |junction| junction == "roundabout") [INFO] [stdout] 34 + .is_some_and(|junction| junction == "roundabout") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/map_data/proximity.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | u16, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u16::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Coord` which implements the `Copy` trait [INFO] [stdout] --> src/map_data/proximity.rs:124:54 [INFO] [stdout] | [INFO] [stdout] 124 | adjusted_coords.insert(AdjustedCoord(next_coord.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_coord` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Coord` which implements the `Copy` trait [INFO] [stdout] --> src/map_data/proximity.rs:129:54 [INFO] [stdout] | [INFO] [stdout] 129 | adjusted_coords.insert(AdjustedCoord(next_coord.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_coord` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Coord` which implements the `Copy` trait [INFO] [stdout] --> src/map_data/proximity.rs:134:54 [INFO] [stdout] | [INFO] [stdout] 134 | adjusted_coords.insert(AdjustedCoord(next_coord.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_coord` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Coord` which implements the `Copy` trait [INFO] [stdout] --> src/map_data/proximity.rs:139:54 [INFO] [stdout] | [INFO] [stdout] 139 | adjusted_coords.insert(AdjustedCoord(next_coord.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_coord` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map` over `inspect` [INFO] [stdout] --> src/map_data/proximity.rs:146:14 [INFO] [stdout] | [INFO] [stdout] 146 | .map(|coords| { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 146 ~ .inspect(|coords| { [INFO] [stdout] 147 | self.point_grid [INFO] [stdout] 148 ~ .insert(coords.0.y as f32, coords.0.x as f32, multi_polygon); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/map_data/proximity.rs:252:28 [INFO] [stdout] | [INFO] [stdout] 252 | let cell_ids = match cell_ids { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 253 | | Some(ids) => ids, [INFO] [stdout] 254 | | None => return None, [INFO] [stdout] 255 | | }; [INFO] [stdout] | |_____________^ help: try instead: `cell_ids?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/map_data_cache.rs:15:33 [INFO] [stdout] | [INFO] [stdout] 15 | fn read_cache_file(file_folder: &PathBuf, file_name: &str) -> Result, MapDataCacheError> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 15 ~ fn read_cache_file(file_folder: &Path, file_name: &str) -> Result, MapDataCacheError> { [INFO] [stdout] 16 ~ let mut file = file_folder.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/map_data_cache.rs:24:18 [INFO] [stdout] | [INFO] [stdout] 24 | file_folder: &PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 ~ file_folder: &Path, [INFO] [stdout] 25 | file_name: &str, [INFO] [stdout] 26 | file_contents: &Vec, [INFO] [stdout] 27 | ) -> Result<(), MapDataCacheError> { [INFO] [stdout] 28 ~ let mut file = file_folder.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/router/route/mod.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | pub struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_test_data_osm_json_nodes` is never used [INFO] [stdout] --> src/test_utils.rs:411:8 [INFO] [stdout] | [INFO] [stdout] 411 | pub fn get_test_data_osm_json_nodes() -> Vec<&'static str> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/map_data_cache.rs:215:9 [INFO] [stdout] | [INFO] [stdout] 215 | / let Some(mut metadata_file_path) = self.cache_dir.clone() else { [INFO] [stdout] 216 | | return None; [INFO] [stdout] 217 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let mut metadata_file_path = self.cache_dir.clone()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/data_reader.rs:40:35 [INFO] [stdout] | [INFO] [stdout] 40 | pub fn read_data(mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/debug/writer.rs:216:45 [INFO] [stdout] | [INFO] [stdout] 216 | pub fn get_metadata_file_path(dir_name: &PathBuf) -> PathBuf { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 216 ~ pub fn get_metadata_file_path(dir_name: &Path) -> PathBuf { [INFO] [stdout] 217 ~ let mut metadata_file = dir_name.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/debug/writer.rs:271:28 [INFO] [stdout] | [INFO] [stdout] 271 | discarded_choices: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 271 - discarded_choices: &Vec, [INFO] [stdout] 271 + discarded_choices: &[MapDataPointRef], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/gpx_writer.rs:3:54 [INFO] [stdout] | [INFO] [stdout] 3 | use std::{collections::HashMap, fs::File, io::Error, isize, path::PathBuf}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `isize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:109:39 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 109 | pub fn get_element_type(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:117:39 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 117 | pub fn get_node_element(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:140:38 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 140 | pub fn get_way_element(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:160:43 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 160 | pub fn get_relation_element(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:182:26 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 182 | .map(|member| { [INFO] [stdout] | __________________________^ [INFO] [stdout] 183 | | Ok(OsmRelationMember { [INFO] [stdout] 184 | | member_type: match member.member_type.clone().ok_or( [INFO] [stdout] 185 | | OsmJsonParserError::MissingValueForElement { [INFO] [stdout] ... | [INFO] [stdout] 212 | | }) [INFO] [stdout] 213 | | }) [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:248:52 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 248 | pub fn parse_line(&mut self, line: Vec) -> Result, OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:262:10 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 262 | ) -> Result, OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:315:65 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 315 | fn check_update_current_element(&mut self, val: &String) -> Result<(), OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/gpx_writer.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | gpx.version = GpxVersion::Gpx11; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `gpx::Gpx { version: GpxVersion::Gpx11, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/gpx_writer.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | let mut gpx = Gpx::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:417:39 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 417 | fn set_bracket_open(&mut self) -> Result<(), OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:427:40 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 427 | fn set_bracket_close(&mut self) -> Result<(), OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:441:37 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 441 | fn set_curly_open(&mut self) -> Result<(), OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:467:38 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 467 | fn set_curly_close(&mut self) -> Result, OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_reader.rs:29:30 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn read(mut self) -> Result<(), OsmDataReaderError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_reader.rs:61:66 [INFO] [stdout] | [INFO] [stdout] 61 | fn process_elements(&mut self, elements: Vec) -> Result<(), OsmDataReaderError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/osm_data/pbf_area_reader.rs:92:16 [INFO] [stdout] | [INFO] [stdout] 92 | if current_boundary.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `current_boundary.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/pbf_area_reader.rs:194:49 [INFO] [stdout] | [INFO] [stdout] 194 | pub fn read(&mut self, selection: &T) -> Result<(), OsmDataReaderError> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `.map().collect()` can be replaced with `.try_for_each()` [INFO] [stdout] --> src/osm_data/pbf_area_reader.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | / self.pbf [INFO] [stdout] 203 | | .get_objs_and_deps(|el| selection(el)) [INFO] [stdout] 204 | | .map_err(|error| OsmDataReaderError::PbfFileReadError { error })? [INFO] [stdout] 205 | | .into_iter() [INFO] [stdout] ... | [INFO] [stdout] 223 | | }) [INFO] [stdout] 224 | | .collect::>()?; [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_collect_result_unit [INFO] [stdout] = note: `#[warn(clippy::map_collect_result_unit)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 202 ~ self.pbf [INFO] [stdout] 203 + .get_objs_and_deps(|el| selection(el)) [INFO] [stdout] 204 + .map_err(|error| OsmDataReaderError::PbfFileReadError { error })? [INFO] [stdout] 205 + .into_iter().try_for_each(|(_id, element)| { [INFO] [stdout] 206 + if selection(&element) { [INFO] [stdout] 207 + if let Some(rel) = element.relation() { [INFO] [stdout] 208 + self.boundaries.push(Boundary::Relation(rel.clone())); [INFO] [stdout] 209 + } else if let Some(w) = element.way() { [INFO] [stdout] 210 + self.boundaries.push(Boundary::Way(w.clone())); [INFO] [stdout] 211 + } else { [INFO] [stdout] 212 + return Err(OsmDataReaderError::PbfFileError { [INFO] [stdout] 213 + error: String::from("Expected way or relation"), [INFO] [stdout] 214 + }); [INFO] [stdout] 215 + } [INFO] [stdout] 216 + } else if let Some(way) = element.way() { [INFO] [stdout] 217 + self.ways.insert(element.id().inner_id(), way.clone()); [INFO] [stdout] 218 + } else if let Some(node) = element.node() { [INFO] [stdout] 219 + self.nodes.insert(element.id().inner_id(), node.clone()); [INFO] [stdout] 220 + } [INFO] [stdout] 221 + Ok(()) [INFO] [stdout] 222 ~ })?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/osm_data/pbf_area_reader.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | / self.pbf [INFO] [stdout] 203 | | .get_objs_and_deps(|el| selection(el)) [INFO] [stdout] 204 | | .map_err(|error| OsmDataReaderError::PbfFileReadError { error })? [INFO] [stdout] 205 | | .into_iter() [INFO] [stdout] ... | [INFO] [stdout] 222 | | Ok(()) [INFO] [stdout] 223 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 202 ~ self.pbf [INFO] [stdout] 203 + .get_objs_and_deps(|el| selection(el)) [INFO] [stdout] 204 + .map_err(|error| OsmDataReaderError::PbfFileReadError { error })?.into_values().map(|element| { [INFO] [stdout] 205 + if selection(&element) { [INFO] [stdout] 206 + if let Some(rel) = element.relation() { [INFO] [stdout] 207 + self.boundaries.push(Boundary::Relation(rel.clone())); [INFO] [stdout] 208 + } else if let Some(w) = element.way() { [INFO] [stdout] 209 + self.boundaries.push(Boundary::Way(w.clone())); [INFO] [stdout] 210 + } else { [INFO] [stdout] 211 + return Err(OsmDataReaderError::PbfFileError { [INFO] [stdout] 212 + error: String::from("Expected way or relation"), [INFO] [stdout] 213 + }); [INFO] [stdout] 214 + } [INFO] [stdout] 215 + } else if let Some(way) = element.way() { [INFO] [stdout] 216 + self.ways.insert(element.id().inner_id(), way.clone()); [INFO] [stdout] 217 + } else if let Some(node) = element.node() { [INFO] [stdout] 218 + self.nodes.insert(element.id().inner_id(), node.clone()); [INFO] [stdout] 219 + } [INFO] [stdout] 220 + Ok(()) [INFO] [stdout] 221 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/osm_data/pbf_area_reader.rs:206:18 [INFO] [stdout] | [INFO] [stdout] 206 | .map(|(_id, element)| { [INFO] [stdout] | __________________^ [INFO] [stdout] 207 | | if selection(&element) { [INFO] [stdout] 208 | | if let Some(rel) = element.relation() { [INFO] [stdout] 209 | | self.boundaries.push(Boundary::Relation(rel.clone())); [INFO] [stdout] ... | [INFO] [stdout] 222 | | Ok(()) [INFO] [stdout] 223 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/osm_data/pbf_area_reader.rs:229:18 [INFO] [stdout] | [INFO] [stdout] 229 | .map(|boundary| { [INFO] [stdout] | __________________^ [INFO] [stdout] 230 | | let border_outer_points = self.get_line_strings_from_boundary(boundary, "outer"); [INFO] [stdout] 231 | | let border_inner_points = self.get_line_strings_from_boundary(boundary, "inner"); [INFO] [stdout] ... | [INFO] [stdout] 236 | | )) [INFO] [stdout] 237 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/pbf_reader.rs:43:26 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn read(self) -> Result<(), OsmDataReaderError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/osm_data/pbf_reader.rs:81:45 [INFO] [stdout] | [INFO] [stdout] 81 | |(_element_id, element)| -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/osm_data/pbf_reader.rs:175:45 [INFO] [stdout] | [INFO] [stdout] 175 | ... .map(|v| -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/osm_data/pbf_reader.rs:216:35 [INFO] [stdout] | [INFO] [stdout] 216 | .map(|osm_element| -> Result<(), OsmDataReaderError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ipc_handler.rs:169:68 [INFO] [stdout] | [INFO] [stdout] 169 | let request_message: RequestMessage = serde_json::from_str(&string_message) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `string_message` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/result_writer.rs:50:36 [INFO] [stdout] | [INFO] [stdout] 50 | trace!(bytes_len = json.as_bytes().len(), "Writing json to stdout"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `json.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/result_writer.rs:76:33 [INFO] [stdout] | [INFO] [stdout] 76 | bytes_len = json.as_bytes().len(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `json.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/router/generator.rs:255:56 [INFO] [stdout] | [INFO] [stdout] 255 | for itinerary in itineraries.iter().filter(|i| i.waypoints.len() > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!i.waypoints.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/router/generator.rs:260:22 [INFO] [stdout] | [INFO] [stdout] 260 | .map(|p| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 261 | | let point = p.borrow(); [INFO] [stdout] 262 | | vec![point.lat, point.lon] [INFO] [stdout] 263 | | }) [INFO] [stdout] 264 | | .flatten() [INFO] [stdout] | |______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 260 ~ .flat_map(|p| { [INFO] [stdout] 261 + let point = p.borrow(); [INFO] [stdout] 262 + vec![point.lat, point.lon] [INFO] [stdout] 263 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/router/generator.rs:290:29 [INFO] [stdout] | [INFO] [stdout] 290 | .filter(|i| i.waypoints.len() == 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `i.waypoints.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/router/navigator.rs:104:18 [INFO] [stdout] | [INFO] [stdout] 104 | weights: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 104 - weights: &Vec, [INFO] [stdout] 104 + weights: &[WeightCalcResult], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/router/navigator.rs:106:12 [INFO] [stdout] | [INFO] [stdout] 106 | if weights [INFO] [stdout] | ____________^ [INFO] [stdout] 107 | | .iter() [INFO] [stdout] 108 | | .any(|weight| *weight == WeightCalcResult::LastSegmentDoNotUse) [INFO] [stdout] | |___________________________________________________________________________^ help: try: `weights.contains(&WeightCalcResult::LastSegmentDoNotUse)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/router/route/score.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | / if let RulesTagValueAction::Priority { [INFO] [stdout] 22 | | value: priority_value, [INFO] [stdout] 23 | | } = curr_tag_rule [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/router/route/score.rs:20:25 [INFO] [stdout] | [INFO] [stdout] 20 | if let Some(curr_tag_rule) = tag_rules.get(curr_tag.as_str()) { [INFO] [stdout] | ^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 21 | if let RulesTagValueAction::Priority { [INFO] [stdout] | ________________________^ [INFO] [stdout] 22 | | value: priority_value, [INFO] [stdout] 23 | | } = curr_tag_rule [INFO] [stdout] | |_________________^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/router/route/score.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | if let Some(ref curr_tag) = tag { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 18 - if let Some(ref curr_tag) = tag { [INFO] [stdout] 18 + if let Some(curr_tag) = tag { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/router/route/segment_list.rs:43:60 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn exclude_segments_where_points_in(&self, points: &Vec) -> SegmentList { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - pub fn exclude_segments_where_points_in(&self, points: &Vec) -> SegmentList { [INFO] [stdout] 43 + pub fn exclude_segments_where_points_in(&self, points: &[MapDataPointRef]) -> SegmentList { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/map_data/graph.rs:454:24 [INFO] [stdout] | [INFO] [stdout] 454 | return ALLOWED_HIGHWAY_VALUES.contains(&highway.as_str()) [INFO] [stdout] | ________________________^ [INFO] [stdout] 455 | | && (highway != "path" || (highway == "path" && motorcycle)); [INFO] [stdout] | |_______________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 454 - return ALLOWED_HIGHWAY_VALUES.contains(&highway.as_str()) [INFO] [stdout] 455 - && (highway != "path" || (highway == "path" && motorcycle)); [INFO] [stdout] 454 + return !(!ALLOWED_HIGHWAY_VALUES.contains(&highway.as_str()) || highway == "path" && !motorcycle); [INFO] [stdout] | [INFO] [stdout] 454 - return ALLOWED_HIGHWAY_VALUES.contains(&highway.as_str()) [INFO] [stdout] 455 - && (highway != "path" || (highway == "path" && motorcycle)); [INFO] [stdout] 454 + return (motorcycle || highway != "path") && ALLOWED_HIGHWAY_VALUES.contains(&highway.as_str()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/map_data/graph.rs:455:24 [INFO] [stdout] | [INFO] [stdout] 455 | && (highway != "path" || (highway == "path" && motorcycle)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 455 - && (highway != "path" || (highway == "path" && motorcycle)); [INFO] [stdout] 455 + && !(highway == "path" && !motorcycle); [INFO] [stdout] | [INFO] [stdout] 455 - && (highway != "path" || (highway == "path" && motorcycle)); [INFO] [stdout] 455 + && highway != "path" || motorcycle; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/map_data/graph.rs:575:26 [INFO] [stdout] | [INFO] [stdout] 575 | members: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 575 - members: &Vec, [INFO] [stdout] 575 + members: &[OsmRelationMember], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/map_data/graph.rs:690:30 [INFO] [stdout] | [INFO] [stdout] 690 | let closest_points = match closest_points { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 691 | | Some(p) => p, [INFO] [stdout] 692 | | None => return None, [INFO] [stdout] 693 | | }; [INFO] [stdout] | |_________^ help: try instead: `closest_points?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/map_data/graph.rs:696:32 [INFO] [stdout] | [INFO] [stdout] 696 | let check_limit_tags = limit_to_hw_tags.as_ref().map_or(false, |limit_tags| { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 697 | | limit_tags [INFO] [stdout] 698 | | .iter() [INFO] [stdout] 699 | | .any(|limit_tag| !avoid_tags.contains(&AvoidTag::Highway(limit_tag.to_string()))) [INFO] [stdout] 700 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 696 - let check_limit_tags = limit_to_hw_tags.as_ref().map_or(false, |limit_tags| { [INFO] [stdout] 696 + let check_limit_tags = limit_to_hw_tags.as_ref().is_some_and(|limit_tags| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/map_data/graph.rs:853:37 [INFO] [stdout] | [INFO] [stdout] 853 | use std::{collections::HashSet, u8}; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u8::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/map_data/graph.rs:1243:17 [INFO] [stdout] | [INFO] [stdout] 1243 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/map_data/graph.rs:1248:21 [INFO] [stdout] | [INFO] [stdout] 1248 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/map_data/graph.rs:1286:24 [INFO] [stdout] | [INFO] [stdout] 1286 | let tests: Vec<(u8, MapDataPointRef, Vec<(String, u64)>)> = vec![ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/map_data/osm.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | tags.get("oneway").map_or(false, |one_way| one_way == "yes") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 22 - tags.get("oneway").map_or(false, |one_way| one_way == "yes") [INFO] [stdout] 22 + tags.get("oneway").is_some_and(|one_way| one_way == "yes") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/map_data/osm.rs:23:20 [INFO] [stdout] | [INFO] [stdout] 23 | || tags [INFO] [stdout] | ____________________^ [INFO] [stdout] 24 | | .get("junction") [INFO] [stdout] 25 | | .map_or(false, |junction| junction == "roundabout") [INFO] [stdout] | |_______________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 25 - .map_or(false, |junction| junction == "roundabout") [INFO] [stdout] 25 + .is_some_and(|junction| junction == "roundabout") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/map_data/osm.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | / tags.get("junction") [INFO] [stdout] 34 | | .map_or(false, |junction| junction == "roundabout") [INFO] [stdout] | |___________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 34 - .map_or(false, |junction| junction == "roundabout") [INFO] [stdout] 34 + .is_some_and(|junction| junction == "roundabout") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/map_data/proximity.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | u16, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u16::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Coord` which implements the `Copy` trait [INFO] [stdout] --> src/map_data/proximity.rs:124:54 [INFO] [stdout] | [INFO] [stdout] 124 | adjusted_coords.insert(AdjustedCoord(next_coord.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_coord` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Coord` which implements the `Copy` trait [INFO] [stdout] --> src/map_data/proximity.rs:129:54 [INFO] [stdout] | [INFO] [stdout] 129 | adjusted_coords.insert(AdjustedCoord(next_coord.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_coord` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Coord` which implements the `Copy` trait [INFO] [stdout] --> src/map_data/proximity.rs:134:54 [INFO] [stdout] | [INFO] [stdout] 134 | adjusted_coords.insert(AdjustedCoord(next_coord.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_coord` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Coord` which implements the `Copy` trait [INFO] [stdout] --> src/map_data/proximity.rs:139:54 [INFO] [stdout] | [INFO] [stdout] 139 | adjusted_coords.insert(AdjustedCoord(next_coord.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_coord` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map` over `inspect` [INFO] [stdout] --> src/map_data/proximity.rs:146:14 [INFO] [stdout] | [INFO] [stdout] 146 | .map(|coords| { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 146 ~ .inspect(|coords| { [INFO] [stdout] 147 | self.point_grid [INFO] [stdout] 148 ~ .insert(coords.0.y as f32, coords.0.x as f32, multi_polygon); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/map_data/proximity.rs:252:28 [INFO] [stdout] | [INFO] [stdout] 252 | let cell_ids = match cell_ids { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 253 | | Some(ids) => ids, [INFO] [stdout] 254 | | None => return None, [INFO] [stdout] 255 | | }; [INFO] [stdout] | |_____________^ help: try instead: `cell_ids?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/router/walker.rs:203:40 [INFO] [stdout] | [INFO] [stdout] 203 | if visited_points.contains(¤t_segment.get_end_point()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `current_segment.get_end_point()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/map_data_cache.rs:15:33 [INFO] [stdout] | [INFO] [stdout] 15 | fn read_cache_file(file_folder: &PathBuf, file_name: &str) -> Result, MapDataCacheError> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 15 ~ fn read_cache_file(file_folder: &Path, file_name: &str) -> Result, MapDataCacheError> { [INFO] [stdout] 16 ~ let mut file = file_folder.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/map_data_cache.rs:24:18 [INFO] [stdout] | [INFO] [stdout] 24 | file_folder: &PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 ~ file_folder: &Path, [INFO] [stdout] 25 | file_name: &str, [INFO] [stdout] 26 | file_contents: &Vec, [INFO] [stdout] 27 | ) -> Result<(), MapDataCacheError> { [INFO] [stdout] 28 ~ let mut file = file_folder.to_path_buf(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/router/weights.rs:462:18 [INFO] [stdout] | [INFO] [stdout] 462 | route_chunk: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 462 - route_chunk: &Vec, [INFO] [stdout] 462 + route_chunk: &[Segment], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/map_data_cache.rs:215:9 [INFO] [stdout] | [INFO] [stdout] 215 | / let Some(mut metadata_file_path) = self.cache_dir.clone() else { [INFO] [stdout] 216 | | return None; [INFO] [stdout] 217 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let mut metadata_file_path = self.cache_dir.clone()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/data_reader.rs:40:35 [INFO] [stdout] | [INFO] [stdout] 40 | pub fn read_data(mut self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] = note: `#[warn(clippy::result_large_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:109:39 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 109 | pub fn get_element_type(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:117:39 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 117 | pub fn get_node_element(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:140:38 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 140 | pub fn get_way_element(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:160:43 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 160 | pub fn get_relation_element(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:182:26 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 182 | .map(|member| { [INFO] [stdout] | __________________________^ [INFO] [stdout] 183 | | Ok(OsmRelationMember { [INFO] [stdout] 184 | | member_type: match member.member_type.clone().ok_or( [INFO] [stdout] 185 | | OsmJsonParserError::MissingValueForElement { [INFO] [stdout] ... | [INFO] [stdout] 212 | | }) [INFO] [stdout] 213 | | }) [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:248:52 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 248 | pub fn parse_line(&mut self, line: Vec) -> Result, OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:262:10 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 262 | ) -> Result, OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:315:65 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 315 | fn check_update_current_element(&mut self, val: &String) -> Result<(), OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:417:39 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 417 | fn set_bracket_open(&mut self) -> Result<(), OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:427:40 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 427 | fn set_bracket_close(&mut self) -> Result<(), OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:441:37 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 441 | fn set_curly_open(&mut self) -> Result<(), OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_parser.rs:467:38 [INFO] [stdout] | [INFO] [stdout] 43 | MissingElementType { element: OsmElement }, [INFO] [stdout] | ------------------------------------------ the largest variant contains at least 152 bytes [INFO] [stdout] ... [INFO] [stdout] 467 | fn set_curly_close(&mut self) -> Result, OsmJsonParserError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::json_parser::OsmJsonParserError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_reader.rs:29:30 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn read(mut self) -> Result<(), OsmDataReaderError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/json_reader.rs:61:66 [INFO] [stdout] | [INFO] [stdout] 61 | fn process_elements(&mut self, elements: Vec) -> Result<(), OsmDataReaderError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/osm_data/pbf_area_reader.rs:92:16 [INFO] [stdout] | [INFO] [stdout] 92 | if current_boundary.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `current_boundary.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/pbf_area_reader.rs:194:49 [INFO] [stdout] | [INFO] [stdout] 194 | pub fn read(&mut self, selection: &T) -> Result<(), OsmDataReaderError> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `.map().collect()` can be replaced with `.try_for_each()` [INFO] [stdout] --> src/osm_data/pbf_area_reader.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | / self.pbf [INFO] [stdout] 203 | | .get_objs_and_deps(|el| selection(el)) [INFO] [stdout] 204 | | .map_err(|error| OsmDataReaderError::PbfFileReadError { error })? [INFO] [stdout] 205 | | .into_iter() [INFO] [stdout] ... | [INFO] [stdout] 223 | | }) [INFO] [stdout] 224 | | .collect::>()?; [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_collect_result_unit [INFO] [stdout] = note: `#[warn(clippy::map_collect_result_unit)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 202 ~ self.pbf [INFO] [stdout] 203 + .get_objs_and_deps(|el| selection(el)) [INFO] [stdout] 204 + .map_err(|error| OsmDataReaderError::PbfFileReadError { error })? [INFO] [stdout] 205 + .into_iter().try_for_each(|(_id, element)| { [INFO] [stdout] 206 + if selection(&element) { [INFO] [stdout] 207 + if let Some(rel) = element.relation() { [INFO] [stdout] 208 + self.boundaries.push(Boundary::Relation(rel.clone())); [INFO] [stdout] 209 + } else if let Some(w) = element.way() { [INFO] [stdout] 210 + self.boundaries.push(Boundary::Way(w.clone())); [INFO] [stdout] 211 + } else { [INFO] [stdout] 212 + return Err(OsmDataReaderError::PbfFileError { [INFO] [stdout] 213 + error: String::from("Expected way or relation"), [INFO] [stdout] 214 + }); [INFO] [stdout] 215 + } [INFO] [stdout] 216 + } else if let Some(way) = element.way() { [INFO] [stdout] 217 + self.ways.insert(element.id().inner_id(), way.clone()); [INFO] [stdout] 218 + } else if let Some(node) = element.node() { [INFO] [stdout] 219 + self.nodes.insert(element.id().inner_id(), node.clone()); [INFO] [stdout] 220 + } [INFO] [stdout] 221 + Ok(()) [INFO] [stdout] 222 ~ })?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/osm_data/pbf_area_reader.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | / self.pbf [INFO] [stdout] 203 | | .get_objs_and_deps(|el| selection(el)) [INFO] [stdout] 204 | | .map_err(|error| OsmDataReaderError::PbfFileReadError { error })? [INFO] [stdout] 205 | | .into_iter() [INFO] [stdout] ... | [INFO] [stdout] 222 | | Ok(()) [INFO] [stdout] 223 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 202 ~ self.pbf [INFO] [stdout] 203 + .get_objs_and_deps(|el| selection(el)) [INFO] [stdout] 204 + .map_err(|error| OsmDataReaderError::PbfFileReadError { error })?.into_values().map(|element| { [INFO] [stdout] 205 + if selection(&element) { [INFO] [stdout] 206 + if let Some(rel) = element.relation() { [INFO] [stdout] 207 + self.boundaries.push(Boundary::Relation(rel.clone())); [INFO] [stdout] 208 + } else if let Some(w) = element.way() { [INFO] [stdout] 209 + self.boundaries.push(Boundary::Way(w.clone())); [INFO] [stdout] 210 + } else { [INFO] [stdout] 211 + return Err(OsmDataReaderError::PbfFileError { [INFO] [stdout] 212 + error: String::from("Expected way or relation"), [INFO] [stdout] 213 + }); [INFO] [stdout] 214 + } [INFO] [stdout] 215 + } else if let Some(way) = element.way() { [INFO] [stdout] 216 + self.ways.insert(element.id().inner_id(), way.clone()); [INFO] [stdout] 217 + } else if let Some(node) = element.node() { [INFO] [stdout] 218 + self.nodes.insert(element.id().inner_id(), node.clone()); [INFO] [stdout] 219 + } [INFO] [stdout] 220 + Ok(()) [INFO] [stdout] 221 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/osm_data/pbf_area_reader.rs:206:18 [INFO] [stdout] | [INFO] [stdout] 206 | .map(|(_id, element)| { [INFO] [stdout] | __________________^ [INFO] [stdout] 207 | | if selection(&element) { [INFO] [stdout] 208 | | if let Some(rel) = element.relation() { [INFO] [stdout] 209 | | self.boundaries.push(Boundary::Relation(rel.clone())); [INFO] [stdout] ... | [INFO] [stdout] 222 | | Ok(()) [INFO] [stdout] 223 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/osm_data/pbf_area_reader.rs:229:18 [INFO] [stdout] | [INFO] [stdout] 229 | .map(|boundary| { [INFO] [stdout] | __________________^ [INFO] [stdout] 230 | | let border_outer_points = self.get_line_strings_from_boundary(boundary, "outer"); [INFO] [stdout] 231 | | let border_inner_points = self.get_line_strings_from_boundary(boundary, "inner"); [INFO] [stdout] ... | [INFO] [stdout] 236 | | )) [INFO] [stdout] 237 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this function is very large [INFO] [stdout] --> src/osm_data/pbf_reader.rs:43:26 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn read(self) -> Result<(), OsmDataReaderError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/osm_data/pbf_reader.rs:81:45 [INFO] [stdout] | [INFO] [stdout] 81 | |(_element_id, element)| -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/osm_data/pbf_reader.rs:175:45 [INFO] [stdout] | [INFO] [stdout] 175 | ... .map(|v| -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `Err`-variant returned from this closure is very large [INFO] [stdout] --> src/osm_data/pbf_reader.rs:216:35 [INFO] [stdout] | [INFO] [stdout] 216 | .map(|osm_element| -> Result<(), OsmDataReaderError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] ::: src/osm_data/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | ParserError { error: OsmJsonParserError }, [INFO] [stdout] | ----------------------------------------- the largest variant contains at least 152 bytes [INFO] [stdout] | [INFO] [stdout] = help: try reducing the size of `osm_data::OsmDataReaderError`, for example by boxing large elements or replacing it with `Box` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/result_writer.rs:50:36 [INFO] [stdout] | [INFO] [stdout] 50 | trace!(bytes_len = json.as_bytes().len(), "Writing json to stdout"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `json.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/result_writer.rs:76:33 [INFO] [stdout] | [INFO] [stdout] 76 | bytes_len = json.as_bytes().len(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `json.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/router/generator.rs:255:56 [INFO] [stdout] | [INFO] [stdout] 255 | for itinerary in itineraries.iter().filter(|i| i.waypoints.len() > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!i.waypoints.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/router/generator.rs:260:22 [INFO] [stdout] | [INFO] [stdout] 260 | .map(|p| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 261 | | let point = p.borrow(); [INFO] [stdout] 262 | | vec![point.lat, point.lon] [INFO] [stdout] 263 | | }) [INFO] [stdout] 264 | | .flatten() [INFO] [stdout] | |______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 260 ~ .flat_map(|p| { [INFO] [stdout] 261 + let point = p.borrow(); [INFO] [stdout] 262 + vec![point.lat, point.lon] [INFO] [stdout] 263 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/router/generator.rs:290:29 [INFO] [stdout] | [INFO] [stdout] 290 | .filter(|i| i.waypoints.len() == 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `i.waypoints.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/router/route/mod.rs:324:17 [INFO] [stdout] | [INFO] [stdout] 324 | pub fn iter(&self) -> std::slice::Iter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 324 | pub fn iter(&self) -> std::slice::Iter<'_, Segment> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/router/navigator.rs:104:18 [INFO] [stdout] | [INFO] [stdout] 104 | weights: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 104 - weights: &Vec, [INFO] [stdout] 104 + weights: &[WeightCalcResult], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/router/navigator.rs:106:12 [INFO] [stdout] | [INFO] [stdout] 106 | if weights [INFO] [stdout] | ____________^ [INFO] [stdout] 107 | | .iter() [INFO] [stdout] 108 | | .any(|weight| *weight == WeightCalcResult::LastSegmentDoNotUse) [INFO] [stdout] | |___________________________________________________________________________^ help: try: `weights.contains(&WeightCalcResult::LastSegmentDoNotUse)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/router/navigator.rs:385:21 [INFO] [stdout] | [INFO] [stdout] 385 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/router/navigator.rs:414:21 [INFO] [stdout] | [INFO] [stdout] 414 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/router/navigator.rs:461:21 [INFO] [stdout] | [INFO] [stdout] 461 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/router/navigator.rs:489:17 [INFO] [stdout] | [INFO] [stdout] 489 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/router/navigator.rs:515:17 [INFO] [stdout] | [INFO] [stdout] 515 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/router/navigator.rs:562:21 [INFO] [stdout] | [INFO] [stdout] 562 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/router/route/score.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | / if let RulesTagValueAction::Priority { [INFO] [stdout] 22 | | value: priority_value, [INFO] [stdout] 23 | | } = curr_tag_rule [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/router/route/score.rs:20:25 [INFO] [stdout] | [INFO] [stdout] 20 | if let Some(curr_tag_rule) = tag_rules.get(curr_tag.as_str()) { [INFO] [stdout] | ^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 21 | if let RulesTagValueAction::Priority { [INFO] [stdout] | ________________________^ [INFO] [stdout] 22 | | value: priority_value, [INFO] [stdout] 23 | | } = curr_tag_rule [INFO] [stdout] | |_________________^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/router/route/score.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | if let Some(ref curr_tag) = tag { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 18 - if let Some(ref curr_tag) = tag { [INFO] [stdout] 18 + if let Some(curr_tag) = tag { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/router/route/segment_list.rs:43:60 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn exclude_segments_where_points_in(&self, points: &Vec) -> SegmentList { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - pub fn exclude_segments_where_points_in(&self, points: &Vec) -> SegmentList { [INFO] [stdout] 43 + pub fn exclude_segments_where_points_in(&self, points: &[MapDataPointRef]) -> SegmentList { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/router/walker.rs:203:40 [INFO] [stdout] | [INFO] [stdout] 203 | if visited_points.contains(¤t_segment.get_end_point()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `current_segment.get_end_point()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/router/walker.rs:466:17 [INFO] [stdout] | [INFO] [stdout] 466 | assert!(false) [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/router/weights.rs:462:18 [INFO] [stdout] | [INFO] [stdout] 462 | route_chunk: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 462 - route_chunk: &Vec, [INFO] [stdout] 462 + route_chunk: &[Segment], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/test_utils.rs:358:35 [INFO] [stdout] | [INFO] [stdout] 358 | pub fn graph_from_test_file(file: &PathBuf) -> MapDataGraph { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 358 ~ pub fn graph_from_test_file(file: &Path) -> MapDataGraph { [INFO] [stdout] 359 ~ let data_source = DataSource::JsonFile { file: file.to_path_buf() }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `.map(...).all(identity)` [INFO] [stdout] --> src/test_utils.rs:399:10 [INFO] [stdout] | [INFO] [stdout] 399 | .map(|(idx, &id)| { [INFO] [stdout] | __________^ [INFO] [stdout] 400 | | let route_segment = route.get_segment_by_index(idx); [INFO] [stdout] 401 | | if let Some(route_segment) = route_segment { [INFO] [stdout] 402 | | if route_segment.get_end_point().borrow().id == id { [INFO] [stdout] ... | [INFO] [stdout] 407 | | }) [INFO] [stdout] 408 | | .all(|v| v) [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity [INFO] [stdout] = note: `#[warn(clippy::map_all_any_identity)]` on by default [INFO] [stdout] help: use `.all(...)` instead [INFO] [stdout] | [INFO] [stdout] 399 ~ .all(|(idx, &id)| { [INFO] [stdout] 400 + let route_segment = route.get_segment_by_index(idx); [INFO] [stdout] 401 + if let Some(route_segment) = route_segment { [INFO] [stdout] 402 + if route_segment.get_end_point().borrow().id == id { [INFO] [stdout] 403 + return true; [INFO] [stdout] 404 + } [INFO] [stdout] 405 + } [INFO] [stdout] 406 + false [INFO] [stdout] 407 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/router/route/mod.rs:324:17 [INFO] [stdout] | [INFO] [stdout] 324 | pub fn iter(&self) -> std::slice::Iter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 324 | pub fn iter(&self) -> std::slice::Iter<'_, Segment> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [optimized + debuginfo] target(s) in 39.33s [INFO] running `Command { std: "docker" "inspect" "8a6e316ef61bc3cb3638d8d4f26bc0e86769bab7baa54009c9add96c87cdbdd4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8a6e316ef61bc3cb3638d8d4f26bc0e86769bab7baa54009c9add96c87cdbdd4", kill_on_drop: false }` [INFO] [stdout] 8a6e316ef61bc3cb3638d8d4f26bc0e86769bab7baa54009c9add96c87cdbdd4