[INFO] fetching crate wof 1.0.0... [INFO] linting wof-1.0.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate wof 1.0.0 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate wof 1.0.0 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate wof 1.0.0 [INFO] tweaked toml for crates.io crate wof 1.0.0 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate wof 1.0.0 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 crates.io crate wof 1.0.0 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] Downloading crates ... [INFO] [stderr] Downloaded attohttpc v0.29.2 [INFO] [stderr] Downloaded gdal-sys v0.11.0 [INFO] [stderr] Downloaded syn v2.0.103 [INFO] [stderr] Downloaded libc v0.2.173 [INFO] [stderr] Downloaded openssl-src v300.5.0+3.5.0 [INFO] [stderr] Downloaded geo-types v0.7.16 [INFO] [stderr] Downloaded dbase v0.6.0 [INFO] [stderr] Downloaded gdal v0.18.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] c1a77ecde12bb1ff829f955c67d2cfa919852e9a6266521807c81f85416c4618 [INFO] running `Command { std: "docker" "start" "-a" "c1a77ecde12bb1ff829f955c67d2cfa919852e9a6266521807c81f85416c4618", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c1a77ecde12bb1ff829f955c67d2cfa919852e9a6266521807c81f85416c4618", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c1a77ecde12bb1ff829f955c67d2cfa919852e9a6266521807c81f85416c4618", kill_on_drop: false }` [INFO] [stdout] c1a77ecde12bb1ff829f955c67d2cfa919852e9a6266521807c81f85416c4618 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 37bd816fd3cc35c3b535e32ed82541da9ec73712ce3756da7ee5293a8235ae28 [INFO] running `Command { std: "docker" "start" "-a" "37bd816fd3cc35c3b535e32ed82541da9ec73712ce3756da7ee5293a8235ae28", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.173 [INFO] [stderr] Compiling zerocopy v0.8.25 [INFO] [stderr] Compiling syn v2.0.103 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Checking unicode-normalization v0.1.24 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Compiling rustix v1.0.7 [INFO] [stderr] Checking anstyle-query v1.1.3 [INFO] [stderr] Checking fallible-iterator v0.2.0 [INFO] [stderr] Checking anstream v0.6.19 [INFO] [stderr] Checking form_urlencoded v1.2.1 [INFO] [stderr] Checking stringprep v0.1.5 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Checking clap_builder v4.5.40 [INFO] [stderr] Checking hashbrown v0.15.4 [INFO] [stderr] Checking crc32fast v1.4.2 [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Compiling jobserver v0.1.33 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Compiling cc v1.2.27 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking whoami v1.6.0 [INFO] [stderr] Checking tokio v1.45.1 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking hashlink v0.10.0 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking flate2 v1.1.2 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Checking filetime v0.2.25 [INFO] [stderr] Checking xattr v1.5.0 [INFO] [stderr] Checking dbase v0.6.0 [INFO] [stderr] Checking tar v0.4.44 [INFO] [stderr] Checking md5 v0.7.0 [INFO] [stderr] Checking json v0.12.4 [INFO] [stderr] Checking postgres-protocol v0.6.8 [INFO] [stderr] Compiling openssl-src v300.5.0+3.5.0 [INFO] [stderr] Checking shapefile v0.7.0 [INFO] [stderr] Checking postgres-types v0.2.9 [INFO] [stderr] Compiling openssl-sys v0.9.109 [INFO] [stderr] Compiling libz-sys v1.1.22 [INFO] [stderr] Compiling libssh2-sys v0.3.1 [INFO] [stderr] Compiling libgit2-sys v0.18.1+1.9.0 [INFO] [stderr] Compiling libsqlite3-sys v0.34.0 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking tokio-util v0.7.15 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling clap_derive v4.5.40 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling async-trait v0.1.88 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking zerovec v0.11.2 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking clap v4.5.40 [INFO] [stderr] Checking clap_complete v4.5.54 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.2 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking tokio-postgres v0.7.13 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking postgres v0.19.10 [INFO] [stderr] Checking rusqlite v0.36.0 [INFO] [stderr] Compiling openssl v0.10.73 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking attohttpc v0.29.2 [INFO] [stderr] Checking git2 v0.20.2 [INFO] [stderr] Checking wof v1.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ser.rs:20:7 [INFO] [stdout] | [INFO] [stdout] 20 | writer: writer, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `writer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ser.rs:29:7 [INFO] [stdout] | [INFO] [stdout] 29 | writer: writer, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `writer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:1:27 [INFO] [stdout] | [INFO] [stdout] 1 | pub const TABLE_GEOJSON: &'static str = r#"CREATE TABLE IF NOT EXISTS geojson ( [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: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:9:29 [INFO] [stdout] | [INFO] [stdout] 9 | pub const INDEXES_GEOJSON: &'static str = r#"CREATE UNIQUE INDEX IF NOT EXISTS geojson_by_id ON geojson (id, source); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:13:28 [INFO] [stdout] | [INFO] [stdout] 13 | pub const INSERT_GEOJSON: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:17:23 [INFO] [stdout] | [INFO] [stdout] 17 | pub const TABLE_SPR: &'static str = r#"CREATE TABLE IF NOT EXISTS spr ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:40:25 [INFO] [stdout] | [INFO] [stdout] 40 | pub const INDEXES_SPR: &'static str = r#"CREATE INDEX IF NOT EXISTS spr_by_lastmod ON spr (lastmodified); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | pub const INSERT_SPR: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:70:25 [INFO] [stdout] | [INFO] [stdout] 70 | pub const TABLE_NAMES: &'static str = r#"CREATE TABLE IF NOT EXISTS names ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:85:26 [INFO] [stdout] | [INFO] [stdout] 85 | pub const INSERT_NAMES: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:94:27 [INFO] [stdout] | [INFO] [stdout] 94 | pub const INDEXES_NAMES: &'static str = r#"CREATE INDEX IF NOT EXISTS names_by_lastmod ON names (lastmodified); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:102:29 [INFO] [stdout] | [INFO] [stdout] 102 | pub const TABLE_ANCESTORS: &'static str = r#"CREATE TABLE IF NOT EXISTS ancestors ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:109:31 [INFO] [stdout] | [INFO] [stdout] 109 | pub const INDEXES_ANCESTORS: &'static str = r#"CREATE INDEX IF NOT EXISTS ancestors_by_id ON ancestors (id,ancestor_placetype,lastm... [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:113:30 [INFO] [stdout] | [INFO] [stdout] 113 | pub const INSERT_ANCESTORS: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:120:32 [INFO] [stdout] | [INFO] [stdout] 120 | pub const TABLE_CONCORDANCES: &'static str = r#"CREATE TABLE IF NOT EXISTS concordances ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:127:34 [INFO] [stdout] | [INFO] [stdout] 127 | pub const INDEXES_CONCORDANCES: &'static str = r#"CREATE INDEX IF NOT EXISTS concordances_by_id ON concordances (id,lastmodified); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:132:33 [INFO] [stdout] | [INFO] [stdout] 132 | pub const INSERT_CONCORDANCES: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:142:20 [INFO] [stdout] | [INFO] [stdout] 142 | pub const PRAGMA: &'static str = r#"PRAGMA JOURNAL_MODE=OFF; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:149:28 [INFO] [stdout] | [INFO] [stdout] 149 | pub const SELECT_ALL_IDS: &'static str = "SELECT id FROM geojson"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:151:40 [INFO] [stdout] | [INFO] [stdout] 151 | pub const SELECT_ALL_IDS_WITHOUT_ALT: &'static str = "SELECT id FROM geojson WHERE is_alt = false;"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:153:47 [INFO] [stdout] | [INFO] [stdout] 153 | pub const SELECT_ALL_IDS_WITHOUT_DEPRECATED: &'static str = r#"SELECT geojson.id FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:157:55 [INFO] [stdout] | [INFO] [stdout] 157 | pub const SELECT_ALL_IDS_WITHOUT_ALT_AND_DEPRECATED: &'static str = r#"SELECT geojson.id FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:161:33 [INFO] [stdout] | [INFO] [stdout] 161 | pub const SELECT_ALL_GEOJSONS: &'static str = "SELECT body FROM geojson;"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:163:45 [INFO] [stdout] | [INFO] [stdout] 163 | pub const SELECT_ALL_GEOJSONS_WITHOUT_ALT: &'static str = [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:166:52 [INFO] [stdout] | [INFO] [stdout] 166 | pub const SELECT_ALL_GEOJSONS_WITHOUT_DEPRECATED: &'static str = r#"SELECT geojson.body FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:170:60 [INFO] [stdout] | [INFO] [stdout] 170 | pub const SELECT_ALL_GEOJSONS_WITHOUT_ALT_AND_DEPRECATED: &'static str = r#"SELECT geojson.body FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:174:34 [INFO] [stdout] | [INFO] [stdout] 174 | pub const SELECT_GEOJSON_BY_ID: &'static str = [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:177:32 [INFO] [stdout] | [INFO] [stdout] 177 | pub const UPDATE_GEOJSON_ALT: &'static str = [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sqlite/mod.rs:44:7 [INFO] [stdout] | [INFO] [stdout] 44 | opts: opts, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `opts` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wof.rs:79:7 [INFO] [stdout] | [INFO] [stdout] 79 | bbox: bbox, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `bbox` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | pub const TABLE_GEOMETRIES: &'static str = r#"CREATE TABLE IF NOT EXISTS wof_geometries ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:15:32 [INFO] [stdout] | [INFO] [stdout] 15 | pub const INDEXES_GEOMETRIES: &'static str = r#"CREATE INDEX IF NOT EXISTS wof_geometries_geom ON public.wof_geometries USING gist (... [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:23:31 [INFO] [stdout] | [INFO] [stdout] 23 | pub const INSERT_GEOMETRIES: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:30:22 [INFO] [stdout] | [INFO] [stdout] 30 | pub const GET_SRID: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/shapefile/mod.rs:43:7 [INFO] [stdout] | [INFO] [stdout] 43 | opts: opts, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `opts` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ser.rs:20:7 [INFO] [stdout] | [INFO] [stdout] 20 | writer: writer, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `writer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ser.rs:29:7 [INFO] [stdout] | [INFO] [stdout] 29 | writer: writer, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `writer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:1:27 [INFO] [stdout] | [INFO] [stdout] 1 | pub const TABLE_GEOJSON: &'static str = r#"CREATE TABLE IF NOT EXISTS geojson ( [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: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:9:29 [INFO] [stdout] | [INFO] [stdout] 9 | pub const INDEXES_GEOJSON: &'static str = r#"CREATE UNIQUE INDEX IF NOT EXISTS geojson_by_id ON geojson (id, source); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:13:28 [INFO] [stdout] | [INFO] [stdout] 13 | pub const INSERT_GEOJSON: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:17:23 [INFO] [stdout] | [INFO] [stdout] 17 | pub const TABLE_SPR: &'static str = r#"CREATE TABLE IF NOT EXISTS spr ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:40:25 [INFO] [stdout] | [INFO] [stdout] 40 | pub const INDEXES_SPR: &'static str = r#"CREATE INDEX IF NOT EXISTS spr_by_lastmod ON spr (lastmodified); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | pub const INSERT_SPR: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:70:25 [INFO] [stdout] | [INFO] [stdout] 70 | pub const TABLE_NAMES: &'static str = r#"CREATE TABLE IF NOT EXISTS names ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:85:26 [INFO] [stdout] | [INFO] [stdout] 85 | pub const INSERT_NAMES: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:94:27 [INFO] [stdout] | [INFO] [stdout] 94 | pub const INDEXES_NAMES: &'static str = r#"CREATE INDEX IF NOT EXISTS names_by_lastmod ON names (lastmodified); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:102:29 [INFO] [stdout] | [INFO] [stdout] 102 | pub const TABLE_ANCESTORS: &'static str = r#"CREATE TABLE IF NOT EXISTS ancestors ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:109:31 [INFO] [stdout] | [INFO] [stdout] 109 | pub const INDEXES_ANCESTORS: &'static str = r#"CREATE INDEX IF NOT EXISTS ancestors_by_id ON ancestors (id,ancestor_placetype,lastm... [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:113:30 [INFO] [stdout] | [INFO] [stdout] 113 | pub const INSERT_ANCESTORS: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:120:32 [INFO] [stdout] | [INFO] [stdout] 120 | pub const TABLE_CONCORDANCES: &'static str = r#"CREATE TABLE IF NOT EXISTS concordances ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:127:34 [INFO] [stdout] | [INFO] [stdout] 127 | pub const INDEXES_CONCORDANCES: &'static str = r#"CREATE INDEX IF NOT EXISTS concordances_by_id ON concordances (id,lastmodified); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:132:33 [INFO] [stdout] | [INFO] [stdout] 132 | pub const INSERT_CONCORDANCES: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:142:20 [INFO] [stdout] | [INFO] [stdout] 142 | pub const PRAGMA: &'static str = r#"PRAGMA JOURNAL_MODE=OFF; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:149:28 [INFO] [stdout] | [INFO] [stdout] 149 | pub const SELECT_ALL_IDS: &'static str = "SELECT id FROM geojson"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:151:40 [INFO] [stdout] | [INFO] [stdout] 151 | pub const SELECT_ALL_IDS_WITHOUT_ALT: &'static str = "SELECT id FROM geojson WHERE is_alt = false;"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:153:47 [INFO] [stdout] | [INFO] [stdout] 153 | pub const SELECT_ALL_IDS_WITHOUT_DEPRECATED: &'static str = r#"SELECT geojson.id FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:157:55 [INFO] [stdout] | [INFO] [stdout] 157 | pub const SELECT_ALL_IDS_WITHOUT_ALT_AND_DEPRECATED: &'static str = r#"SELECT geojson.id FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:161:33 [INFO] [stdout] | [INFO] [stdout] 161 | pub const SELECT_ALL_GEOJSONS: &'static str = "SELECT body FROM geojson;"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:163:45 [INFO] [stdout] | [INFO] [stdout] 163 | pub const SELECT_ALL_GEOJSONS_WITHOUT_ALT: &'static str = [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:166:52 [INFO] [stdout] | [INFO] [stdout] 166 | pub const SELECT_ALL_GEOJSONS_WITHOUT_DEPRECATED: &'static str = r#"SELECT geojson.body FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:170:60 [INFO] [stdout] | [INFO] [stdout] 170 | pub const SELECT_ALL_GEOJSONS_WITHOUT_ALT_AND_DEPRECATED: &'static str = r#"SELECT geojson.body FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:174:34 [INFO] [stdout] | [INFO] [stdout] 174 | pub const SELECT_GEOJSON_BY_ID: &'static str = [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:177:32 [INFO] [stdout] | [INFO] [stdout] 177 | pub const UPDATE_GEOJSON_ALT: &'static str = [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sqlite/mod.rs:44:7 [INFO] [stdout] | [INFO] [stdout] 44 | opts: opts, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `opts` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wof.rs:79:7 [INFO] [stdout] | [INFO] [stdout] 79 | bbox: bbox, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `bbox` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | pub const TABLE_GEOMETRIES: &'static str = r#"CREATE TABLE IF NOT EXISTS wof_geometries ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:15:32 [INFO] [stdout] | [INFO] [stdout] 15 | pub const INDEXES_GEOMETRIES: &'static str = r#"CREATE INDEX IF NOT EXISTS wof_geometries_geom ON public.wof_geometries USING gist (... [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:23:31 [INFO] [stdout] | [INFO] [stdout] 23 | pub const INSERT_GEOMETRIES: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:30:22 [INFO] [stdout] | [INFO] [stdout] 30 | pub const GET_SRID: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/shapefile/mod.rs:43:7 [INFO] [stdout] | [INFO] [stdout] 43 | opts: opts, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `opts` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/de.rs:12:43 [INFO] [stdout] | [INFO] [stdout] 12 | let (mut predicate, mut index) = _parse(&tokens, index)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/de.rs:16:33 [INFO] [stdout] | [INFO] [stdout] 16 | let (right, i) = _parse(&tokens, index + 1)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/expression/de.rs:36:19 [INFO] [stdout] | [INFO] [stdout] 36 | fn _parse(tokens: &Vec, mut index: usize) -> Result<(Predicate, usize), String> { [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] 36 - fn _parse(tokens: &Vec, mut index: usize) -> Result<(Predicate, usize), String> { [INFO] [stdout] 36 + fn _parse(tokens: &[Token], mut index: usize) -> Result<(Predicate, usize), String> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/de.rs:40:7 [INFO] [stdout] | [INFO] [stdout] 40 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/de.rs:43:11 [INFO] [stdout] | [INFO] [stdout] 43 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/de.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | self.eval(&left)?.as_bool()? && self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^ help: change this to: `left` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:10:51 [INFO] [stdout] | [INFO] [stdout] 10 | self.eval(&left)?.as_bool()? && self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | self.eval(&left)?.as_bool()? || self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^ help: change this to: `left` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:13:51 [INFO] [stdout] | [INFO] [stdout] 13 | self.eval(&left)?.as_bool()? || self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:15:69 [INFO] [stdout] | [INFO] [stdout] 15 | Predicate::Eq(left, right) => Ok(Predicate::Boolean(self.eval(&left)? == self.eval(&right)?)), [INFO] [stdout] | ^^^^^ help: change this to: `left` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:15:90 [INFO] [stdout] | [INFO] [stdout] 15 | Predicate::Eq(left, right) => Ok(Predicate::Boolean(self.eval(&left)? == self.eval(&right)?)), [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:16:70 [INFO] [stdout] | [INFO] [stdout] 16 | Predicate::Not(predicate) => Ok(Predicate::Boolean(!(self.eval(&predicate)?.as_bool()?))), [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `predicate` [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 `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/expression/evaluate.rs:23:37 [INFO] [stdout] | [INFO] [stdout] 23 | fn get_variable_value(&self, key: &String) -> Result { [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] 23 ~ fn get_variable_value(&self, key: &str) -> Result { [INFO] [stdout] 24 ~ match key { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | .ok_or(format!("Evaluated json must contains geometry.type")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains geometry.type".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:59:14 [INFO] [stdout] | [INFO] [stdout] 59 | .ok_or(format!("Evaluated json must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:61:14 [INFO] [stdout] | [INFO] [stdout] 61 | .ok_or(format!("Evaluated json must contains a geometry object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains a geometry object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:63:14 [INFO] [stdout] | [INFO] [stdout] 63 | .ok_or(format!("Evaluated json geometry must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json geometry must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:65:14 [INFO] [stdout] | [INFO] [stdout] 65 | .ok_or(format!("Evaluated json must contains geometry.type")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains geometry.type".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:77:14 [INFO] [stdout] | [INFO] [stdout] 77 | .ok_or(format!("Evaluated json must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | .ok_or(format!("Evaluated json must contains a properties object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains a properties object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:81:14 [INFO] [stdout] | [INFO] [stdout] 81 | .ok_or(format!("Evaluated json properties must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json properties must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/tokenizer.rs:53:15 [INFO] [stdout] | [INFO] [stdout] 53 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/tokenizer.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | &mut self.writer [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.writer` [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 creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:155:31 [INFO] [stdout] | [INFO] [stdout] 155 | let force = self.key == String::from("coordinates") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"coordinates"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:156:24 [INFO] [stdout] | [INFO] [stdout] 156 | || self.key == String::from("bbox") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"bbox"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:157:24 [INFO] [stdout] | [INFO] [stdout] 157 | || self.key == String::from("geom:area") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:area"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:158:24 [INFO] [stdout] | [INFO] [stdout] 158 | || self.key == String::from("geom:area_square_m") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:area_square_m"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:159:24 [INFO] [stdout] | [INFO] [stdout] 159 | || self.key == String::from("geom:latitude") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:latitude"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:160:24 [INFO] [stdout] | [INFO] [stdout] 160 | || self.key == String::from("geom:longitude"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:longitude"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:198:46 [INFO] [stdout] | [INFO] [stdout] 198 | WOFGenerator::ugly(&mut writer).write_json(&json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:204:48 [INFO] [stdout] | [INFO] [stdout] 204 | WOFGenerator::ugly(&mut writer).write_object(&object) [INFO] [stdout] | ^^^^^^^ help: change this to: `object` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:216:48 [INFO] [stdout] | [INFO] [stdout] 216 | WOFGenerator::pretty(&mut writer).write_json(&json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:222:50 [INFO] [stdout] | [INFO] [stdout] 222 | WOFGenerator::pretty(&mut writer).write_object(&object) [INFO] [stdout] | ^^^^^^^ help: change this to: `object` [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: unneeded `return` statement [INFO] [stdout] --> src/de.rs:29:15 [INFO] [stdout] | [INFO] [stdout] 29 | Err(e) => return Err(format!("{}", e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 29 - Err(e) => return Err(format!("{}", e)), [INFO] [stdout] 29 + Err(e) => Err(format!("{}", e)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/de.rs:37:15 [INFO] [stdout] | [INFO] [stdout] 37 | Err(e) => return Err(format!("{}", e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 37 - Err(e) => return Err(format!("{}", e)), [INFO] [stdout] 37 + Err(e) => Err(format!("{}", e)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/de.rs:35:21 [INFO] [stdout] | [INFO] [stdout] 35 | match json::parse(&buffer) { [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [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: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/sqlite/mod.rs:99:42 [INFO] [stdout] | [INFO] [stdout] 99 | let json = crate::parse_file_to_json(path.as_ref().to_path_buf())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `path.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/sqlite/mod.rs:151:12 [INFO] [stdout] | [INFO] [stdout] 151 | if let Ok(_) = if self.opts.pretty { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 151 ~ if (if self.opts.pretty { [INFO] [stdout] 152 + doc.pretty(&mut input) [INFO] [stdout] 153 + } else { [INFO] [stdout] 154 + doc.dump(&mut input) [INFO] [stdout] 155 ~ }).is_ok() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sqlite/mod.rs:310:51 [INFO] [stdout] | [INFO] [stdout] 310 | if let Predicate::Boolean(true) = json.eval(&predicate)? { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `predicate` [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: empty string literal in `writeln!` [INFO] [stdout] --> src/sqlite/mod.rs:312:9 [INFO] [stdout] | [INFO] [stdout] 312 | writeln!(&mut writer, "").stringify_err("Can't write to output")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: float has excessive precision [INFO] [stdout] --> src/utils/compute.rs:6:25 [INFO] [stdout] | [INFO] [stdout] 6 | const DEG_TO_RAD: f64 = 0.0174532925199432958; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stdout] = note: `#[warn(clippy::excessive_precision)]` on by default [INFO] [stdout] help: consider changing the type or truncating it to [INFO] [stdout] | [INFO] [stdout] 6 - const DEG_TO_RAD: f64 = 0.0174532925199432958; [INFO] [stdout] 6 + const DEG_TO_RAD: f64 = 0.017_453_292_519_943_295; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `polyline` [INFO] [stdout] --> src/utils/compute.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 84 | for i in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 84 - for i in 0..len { [INFO] [stdout] 84 + for in polyline.iter().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils/compute.rs:97:3 [INFO] [stdout] | [INFO] [stdout] 97 | return (x / (len as f64), y / (len as f64)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 97 - return (x / (len as f64), y / (len as f64)); [INFO] [stdout] 97 + (x / (len as f64), y / (len as f64)) [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/utils/compute.rs:100:33 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn proj_4326_to_3410(coord: &Vec) -> 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] 100 - pub fn proj_4326_to_3410(coord: &Vec) -> Vec { [INFO] [stdout] 100 + pub fn proj_4326_to_3410(coord: &[f64]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:104:3 [INFO] [stdout] | [INFO] [stdout] 104 | lng = lng * DEG_TO_RAD; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lng *= DEG_TO_RAD` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:105:3 [INFO] [stdout] | [INFO] [stdout] 105 | lat = lat * DEG_TO_RAD; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lat *= DEG_TO_RAD` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:107:3 [INFO] [stdout] | [INFO] [stdout] 107 | lng = lng * SCALE_FACTOR; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lng *= SCALE_FACTOR` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:110:3 [INFO] [stdout] | [INFO] [stdout] 110 | lng = lng * TOTAL_SCALE_3410; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lng *= TOTAL_SCALE_3410` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:111:3 [INFO] [stdout] | [INFO] [stdout] 111 | lat = lat * TOTAL_SCALE_3410; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lat *= TOTAL_SCALE_3410` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/compute.rs:146:45 [INFO] [stdout] | [INFO] [stdout] 146 | (self.windows(2).map(|pts| compute_diff(&pts)).sum::() / 2.0f64).abs() [INFO] [stdout] | ^^^^ help: change this to: `pts` [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: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:351:13 [INFO] [stdout] | [INFO] [stdout] 351 | x = x + area_frac * px; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x += area_frac * px` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:352:13 [INFO] [stdout] | [INFO] [stdout] 352 | y = y + area_frac * py; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `y += area_frac * py` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:424:13 [INFO] [stdout] | [INFO] [stdout] 424 | idx = idx + 1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `idx += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/json.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | &self [INFO] [stdout] | ^^^^^ help: change this to: `self` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/json.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | &self [INFO] [stdout] | ^^^^^ help: change this to: `self` [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 loop could be written as a `for` loop [INFO] [stdout] --> src/utils/path.rs:14:3 [INFO] [stdout] | [INFO] [stdout] 14 | while let Some(c) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in chars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/utils/path.rs:21:6 [INFO] [stdout] | [INFO] [stdout] 21 | if s.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.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: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/utils/path.rs:82:11 [INFO] [stdout] | [INFO] [stdout] 82 | .join(Path::new(&id.to_string()).to_path_buf()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Path::new(&id.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wof.rs:96:36 [INFO] [stdout] | [INFO] [stdout] 96 | Some(JsonValue::Array(a)) => a.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!a.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: match expression looks like `matches!` macro [INFO] [stdout] --> src/wof.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | / match self.properties.get("src:alt_label") { [INFO] [stdout] 129 | | Some(JsonValue::String(_)) => true, [INFO] [stdout] 130 | | _ => false, [INFO] [stdout] 131 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 128 - match self.properties.get("src:alt_label") { [INFO] [stdout] 129 - Some(JsonValue::String(_)) => true, [INFO] [stdout] 130 - _ => false, [INFO] [stdout] 131 - } [INFO] [stdout] 128 + matches!(self.properties.get("src:alt_label"), Some(JsonValue::String(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:189:12 [INFO] [stdout] | [INFO] [stdout] 189 | if !cap.name("lang").is_some() || !cap.name("variant").is_some() || !wof_names.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap.name("lang").is_none()` [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:189:43 [INFO] [stdout] | [INFO] [stdout] 189 | if !cap.name("lang").is_some() || !cap.name("variant").is_some() || !wof_names.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap.name("variant").is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:189:77 [INFO] [stdout] | [INFO] [stdout] 189 | if !cap.name("lang").is_some() || !cap.name("variant").is_some() || !wof_names.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `wof_names.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:219:14 [INFO] [stdout] | [INFO] [stdout] 219 | if !hierarchy.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `hierarchy.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:224:18 [INFO] [stdout] | [INFO] [stdout] 224 | if !cap.name("placetype").is_some() || !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap.name("placetype").is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:224:54 [INFO] [stdout] | [INFO] [stdout] 224 | if !cap.name("placetype").is_some() || !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `id.as_i32().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wof.rs:215:5 [INFO] [stdout] | [INFO] [stdout] 215 | / if let Some(wof_hierarchy) = self.properties.get("wof:hierarchy") { [INFO] [stdout] 216 | | if let Some(hierarchies) = wof_hierarchy.as_array() { [INFO] [stdout] 217 | | for hierarchy in hierarchies { [INFO] [stdout] 218 | | let hierarchy = hierarchy.as_object(); [INFO] [stdout] ... | [INFO] [stdout] 235 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 215 ~ if let Some(wof_hierarchy) = self.properties.get("wof:hierarchy") [INFO] [stdout] 216 ~ && let Some(hierarchies) = wof_hierarchy.as_array() { [INFO] [stdout] 217 | for hierarchy in hierarchies { [INFO] [stdout] ... [INFO] [stdout] 233 | } [INFO] [stdout] 234 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:244:14 [INFO] [stdout] | [INFO] [stdout] 244 | if !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `id.as_i32().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wof.rs:241:5 [INFO] [stdout] | [INFO] [stdout] 241 | / if let Some(wof_concordances) = self.properties.get("wof:concordances") { [INFO] [stdout] 242 | | if let Some(wof_concordances) = wof_concordances.as_object() { [INFO] [stdout] 243 | | for (source, id) in wof_concordances.iter() { [INFO] [stdout] 244 | | if !id.as_i32().is_some() { [INFO] [stdout] ... | [INFO] [stdout] 250 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 241 ~ if let Some(wof_concordances) = self.properties.get("wof:concordances") [INFO] [stdout] 242 ~ && let Some(wof_concordances) = wof_concordances.as_object() { [INFO] [stdout] 243 | for (source, id) in wof_concordances.iter() { [INFO] [stdout] ... [INFO] [stdout] 248 | } [INFO] [stdout] 249 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:309:14 [INFO] [stdout] | [INFO] [stdout] 309 | if !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `id.as_i32().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wof.rs:306:5 [INFO] [stdout] | [INFO] [stdout] 306 | / if let Some(wof_belongs_to) = self.properties.get("wof:belongsto") { [INFO] [stdout] 307 | | if let Some(wof_belongs_to) = wof_belongs_to.as_array() { [INFO] [stdout] 308 | | for id in wof_belongs_to.iter() { [INFO] [stdout] 309 | | if !id.as_i32().is_some() { [INFO] [stdout] ... | [INFO] [stdout] 315 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 306 ~ if let Some(wof_belongs_to) = self.properties.get("wof:belongsto") [INFO] [stdout] 307 ~ && let Some(wof_belongs_to) = wof_belongs_to.as_array() { [INFO] [stdout] 308 | for id in wof_belongs_to.iter() { [INFO] [stdout] ... [INFO] [stdout] 313 | } [INFO] [stdout] 314 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | let geometry = export_geometry(&json)?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:8:38 [INFO] [stdout] | [INFO] [stdout] 8 | let properties = export_porperties(&json, &geometry.as_object().unwrap())?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:8:45 [INFO] [stdout] | [INFO] [stdout] 8 | let properties = export_porperties(&json, &geometry.as_object().unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `geometry.as_object().unwrap()` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | let id = export_id(&json)?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:10:26 [INFO] [stdout] | [INFO] [stdout] 10 | let bbox = export_bbox(&json)?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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: useless use of `format!` [INFO] [stdout] --> src/export.rs:116:16 [INFO] [stdout] | [INFO] [stdout] 116 | return Err(format!("`coordinates` key must be an array.")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"`coordinates` key must be an array.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/export.rs:151:24 [INFO] [stdout] | [INFO] [stdout] 151 | None => return Err(format!("In `geometry`, `type` key is required.")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"In `geometry`, `type` key is required.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/export.rs:162:3 [INFO] [stdout] | [INFO] [stdout] 162 | / if let Some(id) = properties.as_object().unwrap().get("wof:id") { [INFO] [stdout] 163 | | if id.is_number() { [INFO] [stdout] 164 | | return Ok(id.as_i64().unwrap()); [INFO] [stdout] 165 | | } [INFO] [stdout] 166 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 162 ~ if let Some(id) = properties.as_object().unwrap().get("wof:id") [INFO] [stdout] 163 ~ && id.is_number() { [INFO] [stdout] 164 | return Ok(id.as_i64().unwrap()); [INFO] [stdout] 165 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Fix` [INFO] [stdout] --> src/fix.rs:23:3 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn new() -> Self { [INFO] [stdout] 24 | | Fix { population: true } [INFO] [stdout] 25 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 22 + impl Default for Fix { [INFO] [stdout] 23 + fn default() -> Self { [INFO] [stdout] 24 + Self::new() [INFO] [stdout] 25 + } [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/fix.rs:40:14 [INFO] [stdout] | [INFO] [stdout] 40 | .ok_or(format!("Input sinot a GeoJSON"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Input sinot a GeoJSON".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/fix.rs:42:14 [INFO] [stdout] | [INFO] [stdout] 42 | .ok_or(format!("`properties` key not found in GeoJSON"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"`properties` key not found in GeoJSON".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/fix.rs:44:14 [INFO] [stdout] | [INFO] [stdout] 44 | .ok_or(format!("`properties` key is not an object in GeoJSON"))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"`properties` key is not an object in GeoJSON".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/postgres/mod.rs:48:42 [INFO] [stdout] | [INFO] [stdout] 48 | let json = crate::parse_file_to_json(path.as_ref().to_path_buf())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `path.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `src` after checking its variant with `is_some` [INFO] [stdout] --> src/postgres/mod.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 94 | if src.is_some() && dst.is_some() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 95 | let src = src.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `dst` after checking its variant with `is_some` [INFO] [stdout] --> src/postgres/mod.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 94 | if src.is_some() && dst.is_some() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 95 | let src = src.unwrap(); [INFO] [stdout] 96 | let dst = dst.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/repo/walk.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | / if is_geojson && (self.with_alt || !is_altname) { [INFO] [stdout] 66 | | if !self.should_skip(path.path()).unwrap_or(true) { [INFO] [stdout] 67 | | return Some(Ok(path)); [INFO] [stdout] 68 | | } [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 65 ~ if is_geojson && (self.with_alt || !is_altname) [INFO] [stdout] 66 ~ && !self.should_skip(path.path()).unwrap_or(true) { [INFO] [stdout] 67 | return Some(Ok(path)); [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/repo/walk.rs:73:57 [INFO] [stdout] | [INFO] [stdout] 73 | return Some(Err(err.into_io_error().unwrap_or(std::io::Error::new( [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 74 | | std::io::ErrorKind::Other, [INFO] [stdout] 75 | | "file system loop found", [INFO] [stdout] 76 | | )))) [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 73 ~ return Some(Err(err.into_io_error().unwrap_or(std::io::Error::other( [INFO] [stdout] 74 ~ "file system loop found", [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/shapefile/mod.rs:146:31 [INFO] [stdout] | [INFO] [stdout] 146 | pub fn coords_to_point(point: &Vec) -> Point { [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] 146 - pub fn coords_to_point(point: &Vec) -> Point { [INFO] [stdout] 146 + pub fn coords_to_point(point: &[f64]) -> Point { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shapefile/mod.rs:165:33 [INFO] [stdout] | [INFO] [stdout] 165 | parts.push(coords_to_points(&polyline)); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `polyline` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/shapefile/mod.rs:170:37 [INFO] [stdout] | [INFO] [stdout] 170 | fn coords_to_polygon_rings(polygon: &Vec>>) -> 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] 170 - fn coords_to_polygon_rings(polygon: &Vec>>) -> Vec> { [INFO] [stdout] 170 + fn coords_to_polygon_rings(polygon: &[Vec>]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shapefile/mod.rs:176:45 [INFO] [stdout] | [INFO] [stdout] 176 | PolygonRing::Outer(coords_to_points(&polyline)) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `polyline` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shapefile/mod.rs:178:45 [INFO] [stdout] | [INFO] [stdout] 178 | PolygonRing::Inner(coords_to_points(&polyline)) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `polyline` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/shapefile/mod.rs:188:47 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn coords_to_multi_polygon(multi_polygon: &Vec>>>) -> Polygon { [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] 188 - pub fn coords_to_multi_polygon(multi_polygon: &Vec>>>) -> Polygon { [INFO] [stdout] 188 + pub fn coords_to_multi_polygon(multi_polygon: &[Vec>>]) -> Polygon { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/utils/compute.rs:416:21 [INFO] [stdout] | [INFO] [stdout] 416 | let a = vec![next_pts[0] - cur_pts[0], next_pts[1] - cur_pts[1]]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[next_pts[0] - cur_pts[0], next_pts[1] - cur_pts[1]]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/utils/compute.rs:417:21 [INFO] [stdout] | [INFO] [stdout] 417 | let b = vec![checking[0] - cur_pts[0], checking[1] - cur_pts[1]]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[checking[0] - cur_pts[0], checking[1] - cur_pts[1]]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/wof.rs:259:15 [INFO] [stdout] | [INFO] [stdout] 259 | let lat = vec!["wof:latitude", "geom:latitude"] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["wof:latitude", "geom:latitude"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/wof.rs:270:15 [INFO] [stdout] | [INFO] [stdout] 270 | let lon = vec!["wof:longitude", "geom:longitude"] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["wof:longitude", "geom:longitude"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/wof.rs:180:20 [INFO] [stdout] | [INFO] [stdout] 180 | pub fn get_names(&self) -> Vec { [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] 180 | pub fn get_names(&self) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/export.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | assert_eq!(export_json_value(&json).is_err(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 10 - assert_eq!(export_json_value(&json).is_err(), true); [INFO] [stdout] 10 + assert!(export_json_value(&json).is_err()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/export.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | assert_eq!(export_json_value(&json).is_err(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 16 - assert_eq!(export_json_value(&json).is_err(), true); [INFO] [stdout] 16 + assert!(export_json_value(&json).is_err()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/export.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | assert_eq!(export_json_value(&json).is_err(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 22 - assert_eq!(export_json_value(&json).is_err(), true); [INFO] [stdout] 22 + assert!(export_json_value(&json).is_err()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/de.rs:12:43 [INFO] [stdout] | [INFO] [stdout] 12 | let (mut predicate, mut index) = _parse(&tokens, index)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/de.rs:16:33 [INFO] [stdout] | [INFO] [stdout] 16 | let (right, i) = _parse(&tokens, index + 1)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/expression/de.rs:36:19 [INFO] [stdout] | [INFO] [stdout] 36 | fn _parse(tokens: &Vec, mut index: usize) -> Result<(Predicate, usize), String> { [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] 36 - fn _parse(tokens: &Vec, mut index: usize) -> Result<(Predicate, usize), String> { [INFO] [stdout] 36 + fn _parse(tokens: &[Token], mut index: usize) -> Result<(Predicate, usize), String> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/de.rs:40:7 [INFO] [stdout] | [INFO] [stdout] 40 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/de.rs:43:11 [INFO] [stdout] | [INFO] [stdout] 43 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/de.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/de.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | parse(format!("variable = 'true'"))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = 'true'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/de.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | parse(format!("0.6 <> true"))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"0.6 <> true".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/de.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | parse(format!("variable = true AND variable = false"))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = true AND variable = false".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/de.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | parse(format!("variable = true AND variable <> false AND v2 = 32"))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = true AND variable <> false AND v2 = 32".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/de.rs:119:13 [INFO] [stdout] | [INFO] [stdout] 119 | parse(format!("v1 = 1 AND v2 <> 2 OR v3 = 3 AND v4 <> 4"))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"v1 = 1 AND v2 <> 2 OR v3 = 3 AND v4 <> 4".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | self.eval(&left)?.as_bool()? && self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^ help: change this to: `left` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:10:51 [INFO] [stdout] | [INFO] [stdout] 10 | self.eval(&left)?.as_bool()? && self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | self.eval(&left)?.as_bool()? || self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^ help: change this to: `left` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:13:51 [INFO] [stdout] | [INFO] [stdout] 13 | self.eval(&left)?.as_bool()? || self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:15:69 [INFO] [stdout] | [INFO] [stdout] 15 | Predicate::Eq(left, right) => Ok(Predicate::Boolean(self.eval(&left)? == self.eval(&right)?)), [INFO] [stdout] | ^^^^^ help: change this to: `left` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:15:90 [INFO] [stdout] | [INFO] [stdout] 15 | Predicate::Eq(left, right) => Ok(Predicate::Boolean(self.eval(&left)? == self.eval(&right)?)), [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:16:70 [INFO] [stdout] | [INFO] [stdout] 16 | Predicate::Not(predicate) => Ok(Predicate::Boolean(!(self.eval(&predicate)?.as_bool()?))), [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `predicate` [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 `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/expression/evaluate.rs:23:37 [INFO] [stdout] | [INFO] [stdout] 23 | fn get_variable_value(&self, key: &String) -> Result { [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] 23 ~ fn get_variable_value(&self, key: &str) -> Result { [INFO] [stdout] 24 ~ match key { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | .ok_or(format!("Evaluated json must contains geometry.type")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains geometry.type".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:59:14 [INFO] [stdout] | [INFO] [stdout] 59 | .ok_or(format!("Evaluated json must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:61:14 [INFO] [stdout] | [INFO] [stdout] 61 | .ok_or(format!("Evaluated json must contains a geometry object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains a geometry object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:63:14 [INFO] [stdout] | [INFO] [stdout] 63 | .ok_or(format!("Evaluated json geometry must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json geometry must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:65:14 [INFO] [stdout] | [INFO] [stdout] 65 | .ok_or(format!("Evaluated json must contains geometry.type")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains geometry.type".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:77:14 [INFO] [stdout] | [INFO] [stdout] 77 | .ok_or(format!("Evaluated json must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | .ok_or(format!("Evaluated json must contains a properties object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains a properties object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:81:14 [INFO] [stdout] | [INFO] [stdout] 81 | .ok_or(format!("Evaluated json properties must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json properties must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:132:41 [INFO] [stdout] | [INFO] [stdout] 132 | wof_obj.eval(&Predicate::try_from(format!("geom_type = 'Polygon'"))?)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"geom_type = 'Polygon'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:136:38 [INFO] [stdout] | [INFO] [stdout] 136 | json.eval(&Predicate::try_from(format!("geom_type = 'Polygon'"))?)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"geom_type = 'Polygon'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:141:41 [INFO] [stdout] | [INFO] [stdout] 141 | wof_obj.eval(&Predicate::try_from(format!( [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 142 | | "wof:placetype = 'localadmin'" [INFO] [stdout] 143 | | ))?)?, [INFO] [stdout] | |_______^ help: consider using `.to_string()`: `"wof:placetype = 'localadmin'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:147:38 [INFO] [stdout] | [INFO] [stdout] 147 | json.eval(&Predicate::try_from(format!( [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 148 | | "wof:placetype = 'localadmin'" [INFO] [stdout] 149 | | ))?)?, [INFO] [stdout] | |_______^ help: consider using `.to_string()`: `"wof:placetype = 'localadmin'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:154:41 [INFO] [stdout] | [INFO] [stdout] 154 | wof_obj.eval(&Predicate::try_from(format!("wof:id = 101748927"))?)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"wof:id = 101748927".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:158:38 [INFO] [stdout] | [INFO] [stdout] 158 | json.eval(&Predicate::try_from(format!("wof:id = 101748927"))?)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"wof:id = 101748927".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:163:41 [INFO] [stdout] | [INFO] [stdout] 163 | wof_obj.eval(&Predicate::try_from(format!("geom:src = 'osm'"))?)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"geom:src = 'osm'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:167:38 [INFO] [stdout] | [INFO] [stdout] 167 | json.eval(&Predicate::try_from(format!("geom:src = 'osm'"))?)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"geom:src = 'osm'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:172:41 [INFO] [stdout] | [INFO] [stdout] 172 | wof_obj.eval(&Predicate::try_from(format!( [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 173 | | "wof:placetype = wof:placetype" [INFO] [stdout] 174 | | ))?)?, [INFO] [stdout] | |_______^ help: consider using `.to_string()`: `"wof:placetype = wof:placetype".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:178:38 [INFO] [stdout] | [INFO] [stdout] 178 | json.eval(&Predicate::try_from(format!( [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 179 | | "wof:placetype = wof:placetype" [INFO] [stdout] 180 | | ))?)?, [INFO] [stdout] | |_______^ help: consider using `.to_string()`: `"wof:placetype = wof:placetype".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/tokenizer.rs:53:15 [INFO] [stdout] | [INFO] [stdout] 53 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/tokenizer.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:134:16 [INFO] [stdout] | [INFO] [stdout] 134 | tokenize(format!("not true")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"not true".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:138:16 [INFO] [stdout] | [INFO] [stdout] 138 | tokenize(format!("in true")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"in true".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:146:16 [INFO] [stdout] | [INFO] [stdout] 146 | tokenize(format!("variable = 'string'")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = 'string'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:154:16 [INFO] [stdout] | [INFO] [stdout] 154 | tokenize(format!("variable = '''string'''")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = '''string'''".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:162:16 [INFO] [stdout] | [INFO] [stdout] 162 | tokenize(format!("variable = 'string with many words'")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = 'string with many words'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:170:16 [INFO] [stdout] | [INFO] [stdout] 170 | tokenize(format!("variable = '''string with many quotes'''")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = '''string with many quotes'''".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:178:16 [INFO] [stdout] | [INFO] [stdout] 178 | tokenize(format!("variable = ' string with'' '' quotes inside '")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = ' string with'' '' quotes inside '".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:186:16 [INFO] [stdout] | [INFO] [stdout] 186 | tokenize(format!("variable = true")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = true".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/mod.rs:47:27 [INFO] [stdout] | [INFO] [stdout] 47 | Predicate::try_from(format!("variable = 'true'"))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = 'true'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | &mut self.writer [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.writer` [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 creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:155:31 [INFO] [stdout] | [INFO] [stdout] 155 | let force = self.key == String::from("coordinates") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"coordinates"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:156:24 [INFO] [stdout] | [INFO] [stdout] 156 | || self.key == String::from("bbox") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"bbox"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:157:24 [INFO] [stdout] | [INFO] [stdout] 157 | || self.key == String::from("geom:area") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:area"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:158:24 [INFO] [stdout] | [INFO] [stdout] 158 | || self.key == String::from("geom:area_square_m") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:area_square_m"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:159:24 [INFO] [stdout] | [INFO] [stdout] 159 | || self.key == String::from("geom:latitude") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:latitude"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:160:24 [INFO] [stdout] | [INFO] [stdout] 160 | || self.key == String::from("geom:longitude"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:longitude"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:198:46 [INFO] [stdout] | [INFO] [stdout] 198 | WOFGenerator::ugly(&mut writer).write_json(&json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:204:48 [INFO] [stdout] | [INFO] [stdout] 204 | WOFGenerator::ugly(&mut writer).write_object(&object) [INFO] [stdout] | ^^^^^^^ help: change this to: `object` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:216:48 [INFO] [stdout] | [INFO] [stdout] 216 | WOFGenerator::pretty(&mut writer).write_json(&json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:222:50 [INFO] [stdout] | [INFO] [stdout] 222 | WOFGenerator::pretty(&mut writer).write_object(&object) [INFO] [stdout] | ^^^^^^^ help: change this to: `object` [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: unneeded `return` statement [INFO] [stdout] --> src/de.rs:29:15 [INFO] [stdout] | [INFO] [stdout] 29 | Err(e) => return Err(format!("{}", e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 29 - Err(e) => return Err(format!("{}", e)), [INFO] [stdout] 29 + Err(e) => Err(format!("{}", e)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/de.rs:37:15 [INFO] [stdout] | [INFO] [stdout] 37 | Err(e) => return Err(format!("{}", e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 37 - Err(e) => return Err(format!("{}", e)), [INFO] [stdout] 37 + Err(e) => Err(format!("{}", e)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/de.rs:35:21 [INFO] [stdout] | [INFO] [stdout] 35 | match json::parse(&buffer) { [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [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: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/sqlite/mod.rs:99:42 [INFO] [stdout] | [INFO] [stdout] 99 | let json = crate::parse_file_to_json(path.as_ref().to_path_buf())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `path.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/sqlite/mod.rs:151:12 [INFO] [stdout] | [INFO] [stdout] 151 | if let Ok(_) = if self.opts.pretty { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 151 ~ if (if self.opts.pretty { [INFO] [stdout] 152 + doc.pretty(&mut input) [INFO] [stdout] 153 + } else { [INFO] [stdout] 154 + doc.dump(&mut input) [INFO] [stdout] 155 ~ }).is_ok() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sqlite/mod.rs:310:51 [INFO] [stdout] | [INFO] [stdout] 310 | if let Predicate::Boolean(true) = json.eval(&predicate)? { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `predicate` [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: empty string literal in `writeln!` [INFO] [stdout] --> src/sqlite/mod.rs:312:9 [INFO] [stdout] | [INFO] [stdout] 312 | writeln!(&mut writer, "").stringify_err("Can't write to output")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: float has excessive precision [INFO] [stdout] --> src/utils/compute.rs:6:25 [INFO] [stdout] | [INFO] [stdout] 6 | const DEG_TO_RAD: f64 = 0.0174532925199432958; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stdout] = note: `#[warn(clippy::excessive_precision)]` on by default [INFO] [stdout] help: consider changing the type or truncating it to [INFO] [stdout] | [INFO] [stdout] 6 - const DEG_TO_RAD: f64 = 0.0174532925199432958; [INFO] [stdout] 6 + const DEG_TO_RAD: f64 = 0.017_453_292_519_943_295; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `polyline` [INFO] [stdout] --> src/utils/compute.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 84 | for i in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 84 - for i in 0..len { [INFO] [stdout] 84 + for in polyline.iter().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils/compute.rs:97:3 [INFO] [stdout] | [INFO] [stdout] 97 | return (x / (len as f64), y / (len as f64)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 97 - return (x / (len as f64), y / (len as f64)); [INFO] [stdout] 97 + (x / (len as f64), y / (len as f64)) [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/utils/compute.rs:100:33 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn proj_4326_to_3410(coord: &Vec) -> 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] 100 - pub fn proj_4326_to_3410(coord: &Vec) -> Vec { [INFO] [stdout] 100 + pub fn proj_4326_to_3410(coord: &[f64]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:104:3 [INFO] [stdout] | [INFO] [stdout] 104 | lng = lng * DEG_TO_RAD; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lng *= DEG_TO_RAD` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:105:3 [INFO] [stdout] | [INFO] [stdout] 105 | lat = lat * DEG_TO_RAD; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lat *= DEG_TO_RAD` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:107:3 [INFO] [stdout] | [INFO] [stdout] 107 | lng = lng * SCALE_FACTOR; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lng *= SCALE_FACTOR` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:110:3 [INFO] [stdout] | [INFO] [stdout] 110 | lng = lng * TOTAL_SCALE_3410; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lng *= TOTAL_SCALE_3410` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:111:3 [INFO] [stdout] | [INFO] [stdout] 111 | lat = lat * TOTAL_SCALE_3410; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lat *= TOTAL_SCALE_3410` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/compute.rs:146:45 [INFO] [stdout] | [INFO] [stdout] 146 | (self.windows(2).map(|pts| compute_diff(&pts)).sum::() / 2.0f64).abs() [INFO] [stdout] | ^^^^ help: change this to: `pts` [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: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:351:13 [INFO] [stdout] | [INFO] [stdout] 351 | x = x + area_frac * px; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x += area_frac * px` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:352:13 [INFO] [stdout] | [INFO] [stdout] 352 | y = y + area_frac * py; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `y += area_frac * py` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:424:13 [INFO] [stdout] | [INFO] [stdout] 424 | idx = idx + 1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `idx += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/utils/compute.rs:458:5 [INFO] [stdout] | [INFO] [stdout] 458 | assert_eq!(a.0 > b.0 - 0.000001 && a.0 < b.0 + 0.000001, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 458 - assert_eq!(a.0 > b.0 - 0.000001 && a.0 < b.0 + 0.000001, true); [INFO] [stdout] 458 + assert!(a.0 > b.0 - 0.000001 && a.0 < b.0 + 0.000001); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/utils/compute.rs:459:5 [INFO] [stdout] | [INFO] [stdout] 459 | assert_eq!(a.1 > b.1 - 0.000001 && a.1 < b.1 + 0.000001, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 459 - assert_eq!(a.1 > b.1 - 0.000001 && a.1 < b.1 + 0.000001, true); [INFO] [stdout] 459 + assert!(a.1 > b.1 - 0.000001 && a.1 < b.1 + 0.000001); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/commands/build/shapefile.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | shapetype: shapetype, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `shapetype` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: float has excessive precision [INFO] [stdout] --> src/utils/compute.rs:483:44 [INFO] [stdout] | [INFO] [stdout] 483 | assert_eq!(polygon.compute_area_m(), 3332714287168.220703); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stdout] help: consider changing the type or truncating it to [INFO] [stdout] | [INFO] [stdout] 483 - assert_eq!(polygon.compute_area_m(), 3332714287168.220703); [INFO] [stdout] 483 + assert_eq!(polygon.compute_area_m(), 3_332_714_287_168.220_7); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: float has excessive precision [INFO] [stdout] --> src/utils/compute.rs:511:40 [INFO] [stdout] | [INFO] [stdout] 511 | assert_eq!(obj.compute_area_m(), 3332714287168.220703); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stdout] help: consider changing the type or truncating it to [INFO] [stdout] | [INFO] [stdout] 511 - assert_eq!(obj.compute_area_m(), 3332714287168.220703); [INFO] [stdout] 511 + assert_eq!(obj.compute_area_m(), 3_332_714_287_168.220_7); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/json.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | &self [INFO] [stdout] | ^^^^^ help: change this to: `self` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/json.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | &self [INFO] [stdout] | ^^^^^ help: change this to: `self` [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 loop could be written as a `for` loop [INFO] [stdout] --> src/utils/path.rs:14:3 [INFO] [stdout] | [INFO] [stdout] 14 | while let Some(c) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in chars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/utils/path.rs:21:6 [INFO] [stdout] | [INFO] [stdout] 21 | if s.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.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: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/utils/path.rs:82:11 [INFO] [stdout] | [INFO] [stdout] 82 | .join(Path::new(&id.to_string()).to_path_buf()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Path::new(&id.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ser.rs:20:7 [INFO] [stdout] | [INFO] [stdout] 20 | writer: writer, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `writer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ser.rs:29:7 [INFO] [stdout] | [INFO] [stdout] 29 | writer: writer, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `writer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | pub const TABLE_GEOMETRIES: &'static str = r#"CREATE TABLE IF NOT EXISTS wof_geometries ( [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: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:15:32 [INFO] [stdout] | [INFO] [stdout] 15 | pub const INDEXES_GEOMETRIES: &'static str = r#"CREATE INDEX IF NOT EXISTS wof_geometries_geom ON public.wof_geometries USING gist (... [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:23:31 [INFO] [stdout] | [INFO] [stdout] 23 | pub const INSERT_GEOMETRIES: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:30:22 [INFO] [stdout] | [INFO] [stdout] 30 | pub const GET_SRID: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/shapefile/mod.rs:43:7 [INFO] [stdout] | [INFO] [stdout] 43 | opts: opts, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `opts` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wof.rs:96:36 [INFO] [stdout] | [INFO] [stdout] 96 | Some(JsonValue::Array(a)) => a.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!a.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: match expression looks like `matches!` macro [INFO] [stdout] --> src/wof.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | / match self.properties.get("src:alt_label") { [INFO] [stdout] 129 | | Some(JsonValue::String(_)) => true, [INFO] [stdout] 130 | | _ => false, [INFO] [stdout] 131 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 128 - match self.properties.get("src:alt_label") { [INFO] [stdout] 129 - Some(JsonValue::String(_)) => true, [INFO] [stdout] 130 - _ => false, [INFO] [stdout] 131 - } [INFO] [stdout] 128 + matches!(self.properties.get("src:alt_label"), Some(JsonValue::String(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/commands/build/shapefile.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | shapetype: shapetype, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `shapetype` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:189:12 [INFO] [stdout] | [INFO] [stdout] 189 | if !cap.name("lang").is_some() || !cap.name("variant").is_some() || !wof_names.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap.name("lang").is_none()` [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:1:27 [INFO] [stdout] | [INFO] [stdout] 1 | pub const TABLE_GEOJSON: &'static str = r#"CREATE TABLE IF NOT EXISTS geojson ( [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:189:43 [INFO] [stdout] | [INFO] [stdout] 189 | if !cap.name("lang").is_some() || !cap.name("variant").is_some() || !wof_names.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap.name("variant").is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:9:29 [INFO] [stdout] | [INFO] [stdout] 9 | pub const INDEXES_GEOJSON: &'static str = r#"CREATE UNIQUE INDEX IF NOT EXISTS geojson_by_id ON geojson (id, source); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:13:28 [INFO] [stdout] | [INFO] [stdout] 13 | pub const INSERT_GEOJSON: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:17:23 [INFO] [stdout] | [INFO] [stdout] 17 | pub const TABLE_SPR: &'static str = r#"CREATE TABLE IF NOT EXISTS spr ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:40:25 [INFO] [stdout] | [INFO] [stdout] 40 | pub const INDEXES_SPR: &'static str = r#"CREATE INDEX IF NOT EXISTS spr_by_lastmod ON spr (lastmodified); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | pub const INSERT_SPR: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:70:25 [INFO] [stdout] | [INFO] [stdout] 70 | pub const TABLE_NAMES: &'static str = r#"CREATE TABLE IF NOT EXISTS names ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:85:26 [INFO] [stdout] | [INFO] [stdout] 85 | pub const INSERT_NAMES: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:94:27 [INFO] [stdout] | [INFO] [stdout] 94 | pub const INDEXES_NAMES: &'static str = r#"CREATE INDEX IF NOT EXISTS names_by_lastmod ON names (lastmodified); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:102:29 [INFO] [stdout] | [INFO] [stdout] 102 | pub const TABLE_ANCESTORS: &'static str = r#"CREATE TABLE IF NOT EXISTS ancestors ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:109:31 [INFO] [stdout] | [INFO] [stdout] 109 | pub const INDEXES_ANCESTORS: &'static str = r#"CREATE INDEX IF NOT EXISTS ancestors_by_id ON ancestors (id,ancestor_placetype,lastm... [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:113:30 [INFO] [stdout] | [INFO] [stdout] 113 | pub const INSERT_ANCESTORS: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:189:77 [INFO] [stdout] | [INFO] [stdout] 189 | if !cap.name("lang").is_some() || !cap.name("variant").is_some() || !wof_names.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `wof_names.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:120:32 [INFO] [stdout] | [INFO] [stdout] 120 | pub const TABLE_CONCORDANCES: &'static str = r#"CREATE TABLE IF NOT EXISTS concordances ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:127:34 [INFO] [stdout] | [INFO] [stdout] 127 | pub const INDEXES_CONCORDANCES: &'static str = r#"CREATE INDEX IF NOT EXISTS concordances_by_id ON concordances (id,lastmodified); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:132:33 [INFO] [stdout] | [INFO] [stdout] 132 | pub const INSERT_CONCORDANCES: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:142:20 [INFO] [stdout] | [INFO] [stdout] 142 | pub const PRAGMA: &'static str = r#"PRAGMA JOURNAL_MODE=OFF; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:149:28 [INFO] [stdout] | [INFO] [stdout] 149 | pub const SELECT_ALL_IDS: &'static str = "SELECT id FROM geojson"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:151:40 [INFO] [stdout] | [INFO] [stdout] 151 | pub const SELECT_ALL_IDS_WITHOUT_ALT: &'static str = "SELECT id FROM geojson WHERE is_alt = false;"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:153:47 [INFO] [stdout] | [INFO] [stdout] 153 | pub const SELECT_ALL_IDS_WITHOUT_DEPRECATED: &'static str = r#"SELECT geojson.id FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:157:55 [INFO] [stdout] | [INFO] [stdout] 157 | pub const SELECT_ALL_IDS_WITHOUT_ALT_AND_DEPRECATED: &'static str = r#"SELECT geojson.id FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:161:33 [INFO] [stdout] | [INFO] [stdout] 161 | pub const SELECT_ALL_GEOJSONS: &'static str = "SELECT body FROM geojson;"; [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:219:14 [INFO] [stdout] | [INFO] [stdout] 219 | if !hierarchy.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `hierarchy.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:224:18 [INFO] [stdout] | [INFO] [stdout] 224 | if !cap.name("placetype").is_some() || !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap.name("placetype").is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:224:54 [INFO] [stdout] | [INFO] [stdout] 224 | if !cap.name("placetype").is_some() || !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `id.as_i32().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wof.rs:215:5 [INFO] [stdout] | [INFO] [stdout] 215 | / if let Some(wof_hierarchy) = self.properties.get("wof:hierarchy") { [INFO] [stdout] 216 | | if let Some(hierarchies) = wof_hierarchy.as_array() { [INFO] [stdout] 217 | | for hierarchy in hierarchies { [INFO] [stdout] 218 | | let hierarchy = hierarchy.as_object(); [INFO] [stdout] ... | [INFO] [stdout] 235 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 215 ~ if let Some(wof_hierarchy) = self.properties.get("wof:hierarchy") [INFO] [stdout] 216 ~ && let Some(hierarchies) = wof_hierarchy.as_array() { [INFO] [stdout] 217 | for hierarchy in hierarchies { [INFO] [stdout] ... [INFO] [stdout] 233 | } [INFO] [stdout] 234 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:244:14 [INFO] [stdout] | [INFO] [stdout] 244 | if !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `id.as_i32().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wof.rs:241:5 [INFO] [stdout] | [INFO] [stdout] 241 | / if let Some(wof_concordances) = self.properties.get("wof:concordances") { [INFO] [stdout] 242 | | if let Some(wof_concordances) = wof_concordances.as_object() { [INFO] [stdout] 243 | | for (source, id) in wof_concordances.iter() { [INFO] [stdout] 244 | | if !id.as_i32().is_some() { [INFO] [stdout] ... | [INFO] [stdout] 250 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 241 ~ if let Some(wof_concordances) = self.properties.get("wof:concordances") [INFO] [stdout] 242 ~ && let Some(wof_concordances) = wof_concordances.as_object() { [INFO] [stdout] 243 | for (source, id) in wof_concordances.iter() { [INFO] [stdout] ... [INFO] [stdout] 248 | } [INFO] [stdout] 249 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:309:14 [INFO] [stdout] | [INFO] [stdout] 309 | if !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `id.as_i32().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wof.rs:306:5 [INFO] [stdout] | [INFO] [stdout] 306 | / if let Some(wof_belongs_to) = self.properties.get("wof:belongsto") { [INFO] [stdout] 307 | | if let Some(wof_belongs_to) = wof_belongs_to.as_array() { [INFO] [stdout] 308 | | for id in wof_belongs_to.iter() { [INFO] [stdout] 309 | | if !id.as_i32().is_some() { [INFO] [stdout] ... | [INFO] [stdout] 315 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 306 ~ if let Some(wof_belongs_to) = self.properties.get("wof:belongsto") [INFO] [stdout] 307 ~ && let Some(wof_belongs_to) = wof_belongs_to.as_array() { [INFO] [stdout] 308 | for id in wof_belongs_to.iter() { [INFO] [stdout] ... [INFO] [stdout] 313 | } [INFO] [stdout] 314 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | let geometry = export_geometry(&json)?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:8:38 [INFO] [stdout] | [INFO] [stdout] 8 | let properties = export_porperties(&json, &geometry.as_object().unwrap())?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:8:45 [INFO] [stdout] | [INFO] [stdout] 8 | let properties = export_porperties(&json, &geometry.as_object().unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `geometry.as_object().unwrap()` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | let id = export_id(&json)?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:10:26 [INFO] [stdout] | [INFO] [stdout] 10 | let bbox = export_bbox(&json)?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:163:45 [INFO] [stdout] | [INFO] [stdout] 163 | pub const SELECT_ALL_GEOJSONS_WITHOUT_ALT: &'static str = [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:166:52 [INFO] [stdout] | [INFO] [stdout] 166 | pub const SELECT_ALL_GEOJSONS_WITHOUT_DEPRECATED: &'static str = r#"SELECT geojson.body FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:170:60 [INFO] [stdout] | [INFO] [stdout] 170 | pub const SELECT_ALL_GEOJSONS_WITHOUT_ALT_AND_DEPRECATED: &'static str = r#"SELECT geojson.body FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:174:34 [INFO] [stdout] | [INFO] [stdout] 174 | pub const SELECT_GEOJSON_BY_ID: &'static str = [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:177:32 [INFO] [stdout] | [INFO] [stdout] 177 | pub const UPDATE_GEOJSON_ALT: &'static str = [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sqlite/mod.rs:44:7 [INFO] [stdout] | [INFO] [stdout] 44 | opts: opts, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `opts` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/export.rs:116:16 [INFO] [stdout] | [INFO] [stdout] 116 | return Err(format!("`coordinates` key must be an array.")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"`coordinates` key must be an array.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/export.rs:151:24 [INFO] [stdout] | [INFO] [stdout] 151 | None => return Err(format!("In `geometry`, `type` key is required.")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"In `geometry`, `type` key is required.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/export.rs:162:3 [INFO] [stdout] | [INFO] [stdout] 162 | / if let Some(id) = properties.as_object().unwrap().get("wof:id") { [INFO] [stdout] 163 | | if id.is_number() { [INFO] [stdout] 164 | | return Ok(id.as_i64().unwrap()); [INFO] [stdout] 165 | | } [INFO] [stdout] 166 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 162 ~ if let Some(id) = properties.as_object().unwrap().get("wof:id") [INFO] [stdout] 163 ~ && id.is_number() { [INFO] [stdout] 164 | return Ok(id.as_i64().unwrap()); [INFO] [stdout] 165 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Fix` [INFO] [stdout] --> src/fix.rs:23:3 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn new() -> Self { [INFO] [stdout] 24 | | Fix { population: true } [INFO] [stdout] 25 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 22 + impl Default for Fix { [INFO] [stdout] 23 + fn default() -> Self { [INFO] [stdout] 24 + Self::new() [INFO] [stdout] 25 + } [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/fix.rs:40:14 [INFO] [stdout] | [INFO] [stdout] 40 | .ok_or(format!("Input sinot a GeoJSON"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Input sinot a GeoJSON".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/fix.rs:42:14 [INFO] [stdout] | [INFO] [stdout] 42 | .ok_or(format!("`properties` key not found in GeoJSON"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"`properties` key not found in GeoJSON".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/fix.rs:44:14 [INFO] [stdout] | [INFO] [stdout] 44 | .ok_or(format!("`properties` key is not an object in GeoJSON"))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"`properties` key is not an object in GeoJSON".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/postgres/mod.rs:48:42 [INFO] [stdout] | [INFO] [stdout] 48 | let json = crate::parse_file_to_json(path.as_ref().to_path_buf())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `path.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wof.rs:79:7 [INFO] [stdout] | [INFO] [stdout] 79 | bbox: bbox, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `bbox` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `src` after checking its variant with `is_some` [INFO] [stdout] --> src/postgres/mod.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 94 | if src.is_some() && dst.is_some() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 95 | let src = src.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `dst` after checking its variant with `is_some` [INFO] [stdout] --> src/postgres/mod.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 94 | if src.is_some() && dst.is_some() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 95 | let src = src.unwrap(); [INFO] [stdout] 96 | let dst = dst.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/repo/walk.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | / if is_geojson && (self.with_alt || !is_altname) { [INFO] [stdout] 66 | | if !self.should_skip(path.path()).unwrap_or(true) { [INFO] [stdout] 67 | | return Some(Ok(path)); [INFO] [stdout] 68 | | } [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 65 ~ if is_geojson && (self.with_alt || !is_altname) [INFO] [stdout] 66 ~ && !self.should_skip(path.path()).unwrap_or(true) { [INFO] [stdout] 67 | return Some(Ok(path)); [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/repo/walk.rs:73:57 [INFO] [stdout] | [INFO] [stdout] 73 | return Some(Err(err.into_io_error().unwrap_or(std::io::Error::new( [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 74 | | std::io::ErrorKind::Other, [INFO] [stdout] 75 | | "file system loop found", [INFO] [stdout] 76 | | )))) [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 73 ~ return Some(Err(err.into_io_error().unwrap_or(std::io::Error::other( [INFO] [stdout] 74 ~ "file system loop found", [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/shapefile/mod.rs:146:31 [INFO] [stdout] | [INFO] [stdout] 146 | pub fn coords_to_point(point: &Vec) -> Point { [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] 146 - pub fn coords_to_point(point: &Vec) -> Point { [INFO] [stdout] 146 + pub fn coords_to_point(point: &[f64]) -> Point { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shapefile/mod.rs:165:33 [INFO] [stdout] | [INFO] [stdout] 165 | parts.push(coords_to_points(&polyline)); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `polyline` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/shapefile/mod.rs:170:37 [INFO] [stdout] | [INFO] [stdout] 170 | fn coords_to_polygon_rings(polygon: &Vec>>) -> 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] 170 - fn coords_to_polygon_rings(polygon: &Vec>>) -> Vec> { [INFO] [stdout] 170 + fn coords_to_polygon_rings(polygon: &[Vec>]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shapefile/mod.rs:176:45 [INFO] [stdout] | [INFO] [stdout] 176 | PolygonRing::Outer(coords_to_points(&polyline)) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `polyline` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shapefile/mod.rs:178:45 [INFO] [stdout] | [INFO] [stdout] 178 | PolygonRing::Inner(coords_to_points(&polyline)) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `polyline` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/shapefile/mod.rs:188:47 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn coords_to_multi_polygon(multi_polygon: &Vec>>>) -> Polygon { [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] 188 - pub fn coords_to_multi_polygon(multi_polygon: &Vec>>>) -> Polygon { [INFO] [stdout] 188 + pub fn coords_to_multi_polygon(multi_polygon: &[Vec>>]) -> Polygon { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/mod.rs:54:17 [INFO] [stdout] | [INFO] [stdout] 54 | for elem in vec![-1.90, 1.90, 0.0, 0.90, 1234.5678] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[-1.90, 1.90, 0.0, 0.90, 1234.5678]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/mod.rs:64:17 [INFO] [stdout] | [INFO] [stdout] 64 | for elem in vec![1, 2, -1, -100] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, -1, -100]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/mod.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | for elem in vec![true, false] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[true, false]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/mod.rs:84:17 [INFO] [stdout] | [INFO] [stdout] 84 | for elem in vec!["null", "Null", "NULL"] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["null", "Null", "NULL"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/mod.rs:94:17 [INFO] [stdout] | [INFO] [stdout] 94 | for elem in vec!["wof:placetype", "geom_type"] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["wof:placetype", "geom_type"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/tokenizer.rs:97:5 [INFO] [stdout] | [INFO] [stdout] 97 | vec!["=", "=="].iter().for_each(|eq| { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: you can use an array directly: `["=", "=="]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/tokenizer.rs:107:5 [INFO] [stdout] | [INFO] [stdout] 107 | vec!["!=", "<>"].iter().for_each(|neq| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: you can use an array directly: `["!=", "<>"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/tokenizer.rs:117:5 [INFO] [stdout] | [INFO] [stdout] 117 | vec!["and", "&&"].iter().for_each(|neq| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["and", "&&"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/tokenizer.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | vec!["or", "||"].iter().for_each(|neq| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: you can use an array directly: `["or", "||"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/tokenizer.rs:194:17 [INFO] [stdout] | [INFO] [stdout] 194 | for elem in vec![-1.90, 1.90, 0.0, 0.90, 1234.5678] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[-1.90, 1.90, 0.0, 0.90, 1234.5678]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/tokenizer.rs:205:17 [INFO] [stdout] | [INFO] [stdout] 205 | for elem in vec![1, 2, -1, -100] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, -1, -100]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/utils/compute.rs:416:21 [INFO] [stdout] | [INFO] [stdout] 416 | let a = vec![next_pts[0] - cur_pts[0], next_pts[1] - cur_pts[1]]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[next_pts[0] - cur_pts[0], next_pts[1] - cur_pts[1]]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/utils/compute.rs:417:21 [INFO] [stdout] | [INFO] [stdout] 417 | let b = vec![checking[0] - cur_pts[0], checking[1] - cur_pts[1]]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[checking[0] - cur_pts[0], checking[1] - cur_pts[1]]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/wof.rs:259:15 [INFO] [stdout] | [INFO] [stdout] 259 | let lat = vec!["wof:latitude", "geom:latitude"] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["wof:latitude", "geom:latitude"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/wof.rs:270:15 [INFO] [stdout] | [INFO] [stdout] 270 | let lon = vec!["wof:longitude", "geom:longitude"] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["wof:longitude", "geom:longitude"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/wof.rs:180:20 [INFO] [stdout] | [INFO] [stdout] 180 | pub fn get_names(&self) -> Vec { [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] 180 | pub fn get_names(&self) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ser.rs:20:7 [INFO] [stdout] | [INFO] [stdout] 20 | writer: writer, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `writer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ser.rs:29:7 [INFO] [stdout] | [INFO] [stdout] 29 | writer: writer, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `writer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | pub const TABLE_GEOMETRIES: &'static str = r#"CREATE TABLE IF NOT EXISTS wof_geometries ( [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: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:15:32 [INFO] [stdout] | [INFO] [stdout] 15 | pub const INDEXES_GEOMETRIES: &'static str = r#"CREATE INDEX IF NOT EXISTS wof_geometries_geom ON public.wof_geometries USING gist (... [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:23:31 [INFO] [stdout] | [INFO] [stdout] 23 | pub const INSERT_GEOMETRIES: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/postgres/statements.rs:30:22 [INFO] [stdout] | [INFO] [stdout] 30 | pub const GET_SRID: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/shapefile/mod.rs:43:7 [INFO] [stdout] | [INFO] [stdout] 43 | opts: opts, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `opts` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:1:27 [INFO] [stdout] | [INFO] [stdout] 1 | pub const TABLE_GEOJSON: &'static str = r#"CREATE TABLE IF NOT EXISTS geojson ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:9:29 [INFO] [stdout] | [INFO] [stdout] 9 | pub const INDEXES_GEOJSON: &'static str = r#"CREATE UNIQUE INDEX IF NOT EXISTS geojson_by_id ON geojson (id, source); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:13:28 [INFO] [stdout] | [INFO] [stdout] 13 | pub const INSERT_GEOJSON: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:17:23 [INFO] [stdout] | [INFO] [stdout] 17 | pub const TABLE_SPR: &'static str = r#"CREATE TABLE IF NOT EXISTS spr ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:40:25 [INFO] [stdout] | [INFO] [stdout] 40 | pub const INDEXES_SPR: &'static str = r#"CREATE INDEX IF NOT EXISTS spr_by_lastmod ON spr (lastmodified); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | pub const INSERT_SPR: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:70:25 [INFO] [stdout] | [INFO] [stdout] 70 | pub const TABLE_NAMES: &'static str = r#"CREATE TABLE IF NOT EXISTS names ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:85:26 [INFO] [stdout] | [INFO] [stdout] 85 | pub const INSERT_NAMES: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:94:27 [INFO] [stdout] | [INFO] [stdout] 94 | pub const INDEXES_NAMES: &'static str = r#"CREATE INDEX IF NOT EXISTS names_by_lastmod ON names (lastmodified); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:102:29 [INFO] [stdout] | [INFO] [stdout] 102 | pub const TABLE_ANCESTORS: &'static str = r#"CREATE TABLE IF NOT EXISTS ancestors ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:109:31 [INFO] [stdout] | [INFO] [stdout] 109 | pub const INDEXES_ANCESTORS: &'static str = r#"CREATE INDEX IF NOT EXISTS ancestors_by_id ON ancestors (id,ancestor_placetype,lastm... [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:113:30 [INFO] [stdout] | [INFO] [stdout] 113 | pub const INSERT_ANCESTORS: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:120:32 [INFO] [stdout] | [INFO] [stdout] 120 | pub const TABLE_CONCORDANCES: &'static str = r#"CREATE TABLE IF NOT EXISTS concordances ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:127:34 [INFO] [stdout] | [INFO] [stdout] 127 | pub const INDEXES_CONCORDANCES: &'static str = r#"CREATE INDEX IF NOT EXISTS concordances_by_id ON concordances (id,lastmodified); [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:132:33 [INFO] [stdout] | [INFO] [stdout] 132 | pub const INSERT_CONCORDANCES: &'static str = r#" [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:142:20 [INFO] [stdout] | [INFO] [stdout] 142 | pub const PRAGMA: &'static str = r#"PRAGMA JOURNAL_MODE=OFF; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:149:28 [INFO] [stdout] | [INFO] [stdout] 149 | pub const SELECT_ALL_IDS: &'static str = "SELECT id FROM geojson"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:151:40 [INFO] [stdout] | [INFO] [stdout] 151 | pub const SELECT_ALL_IDS_WITHOUT_ALT: &'static str = "SELECT id FROM geojson WHERE is_alt = false;"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:153:47 [INFO] [stdout] | [INFO] [stdout] 153 | pub const SELECT_ALL_IDS_WITHOUT_DEPRECATED: &'static str = r#"SELECT geojson.id FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:157:55 [INFO] [stdout] | [INFO] [stdout] 157 | pub const SELECT_ALL_IDS_WITHOUT_ALT_AND_DEPRECATED: &'static str = r#"SELECT geojson.id FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:161:33 [INFO] [stdout] | [INFO] [stdout] 161 | pub const SELECT_ALL_GEOJSONS: &'static str = "SELECT body FROM geojson;"; [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:163:45 [INFO] [stdout] | [INFO] [stdout] 163 | pub const SELECT_ALL_GEOJSONS_WITHOUT_ALT: &'static str = [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:166:52 [INFO] [stdout] | [INFO] [stdout] 166 | pub const SELECT_ALL_GEOJSONS_WITHOUT_DEPRECATED: &'static str = r#"SELECT geojson.body FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:170:60 [INFO] [stdout] | [INFO] [stdout] 170 | pub const SELECT_ALL_GEOJSONS_WITHOUT_ALT_AND_DEPRECATED: &'static str = r#"SELECT geojson.body FROM ( [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:174:34 [INFO] [stdout] | [INFO] [stdout] 174 | pub const SELECT_GEOJSON_BY_ID: &'static str = [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] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/sqlite/statements.rs:177:32 [INFO] [stdout] | [INFO] [stdout] 177 | pub const UPDATE_GEOJSON_ALT: &'static str = [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sqlite/mod.rs:44:7 [INFO] [stdout] | [INFO] [stdout] 44 | opts: opts, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `opts` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/wof.rs:79:7 [INFO] [stdout] | [INFO] [stdout] 79 | bbox: bbox, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `bbox` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/build/postgres.rs:71:23 [INFO] [stdout] | [INFO] [stdout] 71 | config.password(&password); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `password` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/commands/build/shapefile.rs:93:42 [INFO] [stdout] | [INFO] [stdout] 93 | let json = crate::parse_file_to_json(path.as_ref().to_path_buf())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `path.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/commands/build/shapefile.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | / if let Some(include) = &self.include { [INFO] [stdout] 105 | | if !include.contains(&geojson.get_placetype()) { [INFO] [stdout] 106 | | return Ok(()); [INFO] [stdout] 107 | | } [INFO] [stdout] 108 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 104 ~ if let Some(include) = &self.include [INFO] [stdout] 105 ~ && !include.contains(&geojson.get_placetype()) { [INFO] [stdout] 106 | return Ok(()); [INFO] [stdout] 107 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/commands/build/shapefile.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 109 | / if let Some(exclude) = &self.exclude { [INFO] [stdout] 110 | | if exclude.contains(&geojson.get_placetype()) { [INFO] [stdout] 111 | | return Ok(()); [INFO] [stdout] 112 | | } [INFO] [stdout] 113 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 109 ~ if let Some(exclude) = &self.exclude [INFO] [stdout] 110 ~ && exclude.contains(&geojson.get_placetype()) { [INFO] [stdout] 111 | return Ok(()); [INFO] [stdout] 112 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/commands/build/sqlite.rs:48:7 [INFO] [stdout] | [INFO] [stdout] 48 | *preset == String::from("pelias") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/commands/build/mod.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/commands/build/mod.rs:65:7 [INFO] [stdout] | [INFO] [stdout] 65 | / for entry in Walk::new(directory.to_string(), false, true) { [INFO] [stdout] 66 | | if let Ok(path) = entry { [INFO] [stdout] 67 | | let p = path.path(); [INFO] [stdout] 68 | | if let Err(e) = add(None, Some(p.to_path_buf())) { [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/commands/build/mod.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | / if let Ok(path) = entry { [INFO] [stdout] 67 | | let p = path.path(); [INFO] [stdout] 68 | | if let Err(e) = add(None, Some(p.to_path_buf())) { [INFO] [stdout] 69 | | error!("Something goes wrong for {}: {}", p.display(), e); [INFO] [stdout] ... | [INFO] [stdout] 73 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 65 ~ for path in Walk::new(directory.to_string(), false, true).flatten() { [INFO] [stdout] 66 + let p = path.path(); [INFO] [stdout] 67 + if let Err(e) = add(None, Some(p.to_path_buf())) { [INFO] [stdout] 68 + error!("Something goes wrong for {}: {}", p.display(), e); [INFO] [stdout] 69 + } else { [INFO] [stdout] 70 + count = count + 1; [INFO] [stdout] 71 + } [INFO] [stdout] 72 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/commands/build/mod.rs:65:30 [INFO] [stdout] | [INFO] [stdout] 65 | for entry in Walk::new(directory.to_string(), false, true) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `directory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/commands/build/mod.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/fetch.rs:36:24 [INFO] [stdout] | [INFO] [stdout] 36 | let countries = if self.countries.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.countries.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: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/commands/fetch.rs:65:46 [INFO] [stdout] | [INFO] [stdout] 65 | download_tar_gz_strip(url.to_string(), download_dest.to_path_buf(), 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `download_dest` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/commands/fix.rs:43:10 [INFO] [stdout] | [INFO] [stdout] 43 | .expect(&format!("Cannot walk directory {}", directory)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot walk directory {}", directory))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/commands/fix.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / for entry in Walk::new(directory.to_string(), true, true) { [INFO] [stdout] 49 | | if let Ok(path) = entry { [INFO] [stdout] 50 | | let mut file = [INFO] [stdout] 51 | | File::open(path.path()).expect_exit(format!("Cannot open file {:?}", path).as_str()); [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/commands/fix.rs:49:7 [INFO] [stdout] | [INFO] [stdout] 49 | / if let Ok(path) = entry { [INFO] [stdout] 50 | | let mut file = [INFO] [stdout] 51 | | File::open(path.path()).expect_exit(format!("Cannot open file {:?}", path).as_str()); [INFO] [stdout] 52 | | let mut buffer = String::new(); [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 48 ~ for path in Walk::new(directory.to_string(), true, true).flatten() { [INFO] [stdout] 49 + let mut file = [INFO] [stdout] 50 + File::open(path.path()).expect_exit(format!("Cannot open file {:?}", path).as_str()); [INFO] [stdout] 51 + let mut buffer = String::new(); [INFO] [stdout] 52 + file.read_to_string(&mut buffer).exit_silently(); [INFO] [stdout] 53 + let mut json = crate::parse_string_to_json(&buffer).exit_silently(); [INFO] [stdout] 54 + if fix.fix(&mut json)? { [INFO] [stdout] 55 + let mut file = File::create(path.path()) [INFO] [stdout] 56 + .expect_exit(format!("Cannot create file {:?}", path).as_str()); [INFO] [stdout] 57 + crate::ser::json_to_writer(&json, &mut file) [INFO] [stdout] 58 + .expect_exit(format!("Cannot write to file {:?}", path).as_str()); [INFO] [stdout] 59 + } [INFO] [stdout] 60 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/commands/fix.rs:48:28 [INFO] [stdout] | [INFO] [stdout] 48 | for entry in Walk::new(directory.to_string(), true, true) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `directory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/git.rs:24:35 [INFO] [stdout] | [INFO] [stdout] 24 | git.get_changes_from_commit(&commit) [INFO] [stdout] | ^^^^^^^ help: change this to: `commit` [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: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/commands/git.rs:34:31 [INFO] [stdout] | [INFO] [stdout] 34 | pub fn display(&self, path: &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] 34 - pub fn display(&self, path: &PathBuf) { [INFO] [stdout] 34 + pub fn display(&self, path: &Path) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/commands/git.rs:48:15 [INFO] [stdout] | [INFO] [stdout] 48 | format: format!("id"), [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using `.to_string()`: `"id".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/commands/list.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | / for entry in Walk::new(directory.to_string(), self.alt, !self.no_deprecated) { [INFO] [stdout] 52 | | if let Ok(path) = entry { [INFO] [stdout] 53 | | if self.print_geojson { [INFO] [stdout] 54 | | let mut file = std::fs::File::open(path.path()).exit_silently(); [INFO] [stdout] ... | [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/commands/list.rs:52:7 [INFO] [stdout] | [INFO] [stdout] 52 | / if let Ok(path) = entry { [INFO] [stdout] 53 | | if self.print_geojson { [INFO] [stdout] 54 | | let mut file = std::fs::File::open(path.path()).exit_silently(); [INFO] [stdout] 55 | | let mut buffer = String::new(); [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 51 ~ for path in Walk::new(directory.to_string(), self.alt, !self.no_deprecated).flatten() { [INFO] [stdout] 52 + if self.print_geojson { [INFO] [stdout] 53 + let mut file = std::fs::File::open(path.path()).exit_silently(); [INFO] [stdout] 54 + let mut buffer = String::new(); [INFO] [stdout] 55 + file.read_to_string(&mut buffer).exit_silently(); [INFO] [stdout] 56 + let json = crate::parse_string_to_json(&buffer).exit_silently(); [INFO] [stdout] 57 + if let Predicate::Boolean(true) = json [INFO] [stdout] 58 + .eval(&predicate) [INFO] [stdout] 59 + .expect_exit("Can't evaluate expression") [INFO] [stdout] 60 + { [INFO] [stdout] 61 + crate::ser::json_to_writer(&json, &mut std::io::stdout()).exit_silently(); [INFO] [stdout] 62 + writeln!(std::io::stdout(), "").exit_silently() [INFO] [stdout] 63 + } [INFO] [stdout] 64 + } else { [INFO] [stdout] 65 + writeln!(std::io::stdout(), "{}", path.path().display()).exit_silently(); [INFO] [stdout] 66 + } [INFO] [stdout] 67 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/commands/list.rs:51:28 [INFO] [stdout] | [INFO] [stdout] 51 | for entry in Walk::new(directory.to_string(), self.alt, !self.no_deprecated) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `directory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/list.rs:59:19 [INFO] [stdout] | [INFO] [stdout] 59 | .eval(&predicate) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `predicate` [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: empty string literal in `writeln!` [INFO] [stdout] --> src/commands/list.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | writeln!(std::io::stdout(), "").exit_silently() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` 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/commands/list.rs:86:53 [INFO] [stdout] | [INFO] [stdout] 86 | .write_all_geojsons(&mut std::io::stdout(), &predicate) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `predicate` [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: manual implementation of an assign operation [INFO] [stdout] --> src/commands/patch.rs:76:7 [INFO] [stdout] | [INFO] [stdout] 76 | cpt = cpt + 1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `cpt += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/commands/patch.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | / for entry in Walk::json_or_geojson(directory.to_string()) { [INFO] [stdout] 82 | | if let Ok(path) = entry { [INFO] [stdout] 83 | | let mut file = std::fs::File::open(path.path()) [INFO] [stdout] 84 | | .expect_exit(&format!("Can't open file {:?}", path.path())); [INFO] [stdout] ... | [INFO] [stdout] 96 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/commands/patch.rs:82:7 [INFO] [stdout] | [INFO] [stdout] 82 | / if let Ok(path) = entry { [INFO] [stdout] 83 | | let mut file = std::fs::File::open(path.path()) [INFO] [stdout] 84 | | .expect_exit(&format!("Can't open file {:?}", path.path())); [INFO] [stdout] 85 | | let mut buffer = String::new(); [INFO] [stdout] ... | [INFO] [stdout] 94 | | )); [INFO] [stdout] 95 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 81 ~ for path in Walk::json_or_geojson(directory.to_string()).flatten() { [INFO] [stdout] 82 + let mut file = std::fs::File::open(path.path()) [INFO] [stdout] 83 + .expect_exit(&format!("Can't open file {:?}", path.path())); [INFO] [stdout] 84 + let mut buffer = String::new(); [INFO] [stdout] 85 + file [INFO] [stdout] 86 + .read_to_string(&mut buffer) [INFO] [stdout] 87 + .expect_exit(&format!("Can't open file {:?}", path.path())); [INFO] [stdout] 88 + self [INFO] [stdout] 89 + .apply_buffer_patch(&buffer, &sqlite) [INFO] [stdout] 90 + .expect_exit(&format!( [INFO] [stdout] 91 + "Something goes wrong with patch {:?}", [INFO] [stdout] 92 + path.path() [INFO] [stdout] 93 + )); [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/commands/patch.rs:81:40 [INFO] [stdout] | [INFO] [stdout] 81 | for entry in Walk::json_or_geojson(directory.to_string()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `directory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:90:40 [INFO] [stdout] | [INFO] [stdout] 90 | .apply_buffer_patch(&buffer, &sqlite) [INFO] [stdout] | ^^^^^^^ help: change this to: `sqlite` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:122:38 [INFO] [stdout] | [INFO] [stdout] 122 | Patch::apply_patch_to_original(&json, &mut original_json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:138:38 [INFO] [stdout] | [INFO] [stdout] 138 | Patch::apply_patch_to_original(&json, &mut original_json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:167:61 [INFO] [stdout] | [INFO] [stdout] 167 | Patch::apply_patch_all_names(original_properties, &value)?; [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:169:63 [INFO] [stdout] | [INFO] [stdout] 169 | Patch::set_property_value(original_properties, key, &value)?; [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:183:48 [INFO] [stdout] | [INFO] [stdout] 183 | let wof = WOFGeoJSON::as_valid_wof_geojson(&original)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `original` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:214:59 [INFO] [stdout] | [INFO] [stdout] 214 | Patch::set_property_value(original_properties, key, &value)? [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/print.rs:41:18 [INFO] [stdout] | [INFO] [stdout] 41 | let sqlite = if let Some(sqlite_path) = &self.sqlite { [INFO] [stdout] | __________________^ [INFO] [stdout] 42 | | Some(SQLite::new(sqlite_path, SQLiteOpts::default()).expect_exit("Can't open the database.")) [INFO] [stdout] 43 | | } else { [INFO] [stdout] 44 | | None [INFO] [stdout] 45 | | }; [INFO] [stdout] | |_____^ help: try: `self.sqlite.as_ref().map(|sqlite_path| SQLite::new(sqlite_path, SQLiteOpts::default()).expect_exit("Can't open the database."))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` 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/commands/print.rs:51:34 [INFO] [stdout] | [INFO] [stdout] 51 | self.print_from_database(&db, id); [INFO] [stdout] | ^^^ help: change this to: `db` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/print.rs:53:32 [INFO] [stdout] | [INFO] [stdout] 53 | self.print_from_string(&id); [INFO] [stdout] | ^^^ help: change this to: `id` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/print.rs:70:38 [INFO] [stdout] | [INFO] [stdout] 70 | self.print_from_database(&db, id); [INFO] [stdout] | ^^^ help: change this to: `db` [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 `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/commands/print.rs:126:61 [INFO] [stdout] | [INFO] [stdout] 126 | fn print_json(&self, json: &mut JsonValue, message_error: &String) { [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] 126 ~ fn print_json(&self, json: &mut JsonValue, message_error: &str) { [INFO] [stdout] 127 ~ let obj = json.as_mut_object().expect_exit(message_error); [INFO] [stdout] 128 | if self.no_geom { [INFO] [stdout] ... [INFO] [stdout] 148 | if !self.no_pretty { [INFO] [stdout] 149 ~ json_to_writer_pretty(&json, &mut std::io::stdout()).expect_exit(message_error); [INFO] [stdout] 150 | } else { [INFO] [stdout] 151 ~ json_to_writer(&json, &mut std::io::stdout()).expect_exit(message_error); [INFO] [stdout] 152 ~ writeln!(std::io::stdout(), "").expect_exit(message_error); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/print.rs:149:29 [INFO] [stdout] | [INFO] [stdout] 149 | json_to_writer_pretty(&json, &mut std::io::stdout()).expect_exit(message_error.as_str()); [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/print.rs:151:22 [INFO] [stdout] | [INFO] [stdout] 151 | json_to_writer(&json, &mut std::io::stdout()).expect_exit(message_error.as_str()); [INFO] [stdout] | ^^^^^ help: change this to: `json` [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: empty string literal in `writeln!` [INFO] [stdout] --> src/commands/print.rs:152:7 [INFO] [stdout] | [INFO] [stdout] 152 | writeln!(std::io::stdout(), "").expect_exit(message_error.as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/mod.rs:75:26 [INFO] [stdout] | [INFO] [stdout] 75 | Command::push_args(&mut cmd_args, raw_cmd, elt); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `cmd_args` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/mod.rs:95:25 [INFO] [stdout] | [INFO] [stdout] 95 | Command::push_arg(&mut cmd_args, raw_cmd, elt); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `cmd_args` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/mod.rs:112:45 [INFO] [stdout] | [INFO] [stdout] 112 | if let Err(e) = std::fs::create_dir_all(&path) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/mod.rs:135:27 [INFO] [stdout] | [INFO] [stdout] 135 | assert_directory_exists(&dest); [INFO] [stdout] | ^^^^^ help: change this to: `dest` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/commands/mod.rs:143:18 [INFO] [stdout] | [INFO] [stdout] 143 | let reason = if let Some(reason) = status.canonical_reason() { [INFO] [stdout] | __________________^ [INFO] [stdout] 144 | | reason [INFO] [stdout] 145 | | } else { [INFO] [stdout] 146 | | "Download is not a success" [INFO] [stdout] 147 | | }; [INFO] [stdout] | |_____^ help: replace with: `status.canonical_reason().unwrap_or("Download is not a success")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/mod.rs:205:8 [INFO] [stdout] | [INFO] [stdout] 205 | if !entry.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `entry.is_err()` [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] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/commands/mod.rs:191:18 [INFO] [stdout] | [INFO] [stdout] 191 | let reason = if let Some(reason) = status.canonical_reason() { [INFO] [stdout] | __________________^ [INFO] [stdout] 192 | | reason [INFO] [stdout] 193 | | } else { [INFO] [stdout] 194 | | "Download is not a success" [INFO] [stdout] 195 | | }; [INFO] [stdout] | |_____^ help: replace with: `status.canonical_reason().unwrap_or("Download is not a success")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/commands/mod.rs:228:12 [INFO] [stdout] | [INFO] [stdout] 228 | if let Err(_) = entry.read_to_string(&mut buffer) { [INFO] [stdout] | -------^^^^^^------------------------------------ help: try: `if entry.read_to_string(&mut buffer).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/commands/mod.rs:235:7 [INFO] [stdout] | [INFO] [stdout] 235 | writeln!(std::io::stdout(), "").exit_silently(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/commands/mod.rs:243:5 [INFO] [stdout] | [INFO] [stdout] 243 | / if libc::isatty(libc::STDIN_FILENO) == 0 { [INFO] [stdout] 244 | | true [INFO] [stdout] 245 | | } else { [INFO] [stdout] 246 | | false [INFO] [stdout] 247 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `libc::isatty(libc::STDIN_FILENO) == 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/commands/mod.rs:253:5 [INFO] [stdout] | [INFO] [stdout] 253 | / if libc::isatty(libc::STDOUT_FILENO) == 0 { [INFO] [stdout] 254 | | true [INFO] [stdout] 255 | | } else { [INFO] [stdout] 256 | | false [INFO] [stdout] 257 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `libc::isatty(libc::STDOUT_FILENO) == 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/de.rs:12:43 [INFO] [stdout] | [INFO] [stdout] 12 | let (mut predicate, mut index) = _parse(&tokens, index)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/de.rs:16:33 [INFO] [stdout] | [INFO] [stdout] 16 | let (right, i) = _parse(&tokens, index + 1)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/expression/de.rs:36:19 [INFO] [stdout] | [INFO] [stdout] 36 | fn _parse(tokens: &Vec, mut index: usize) -> Result<(Predicate, usize), String> { [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] 36 - fn _parse(tokens: &Vec, mut index: usize) -> Result<(Predicate, usize), String> { [INFO] [stdout] 36 + fn _parse(tokens: &[Token], mut index: usize) -> Result<(Predicate, usize), String> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/de.rs:40:7 [INFO] [stdout] | [INFO] [stdout] 40 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/de.rs:43:11 [INFO] [stdout] | [INFO] [stdout] 43 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/de.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | self.eval(&left)?.as_bool()? && self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^ help: change this to: `left` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:10:51 [INFO] [stdout] | [INFO] [stdout] 10 | self.eval(&left)?.as_bool()? && self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | self.eval(&left)?.as_bool()? || self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^ help: change this to: `left` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:13:51 [INFO] [stdout] | [INFO] [stdout] 13 | self.eval(&left)?.as_bool()? || self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:15:69 [INFO] [stdout] | [INFO] [stdout] 15 | Predicate::Eq(left, right) => Ok(Predicate::Boolean(self.eval(&left)? == self.eval(&right)?)), [INFO] [stdout] | ^^^^^ help: change this to: `left` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:15:90 [INFO] [stdout] | [INFO] [stdout] 15 | Predicate::Eq(left, right) => Ok(Predicate::Boolean(self.eval(&left)? == self.eval(&right)?)), [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:16:70 [INFO] [stdout] | [INFO] [stdout] 16 | Predicate::Not(predicate) => Ok(Predicate::Boolean(!(self.eval(&predicate)?.as_bool()?))), [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `predicate` [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 `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/expression/evaluate.rs:23:37 [INFO] [stdout] | [INFO] [stdout] 23 | fn get_variable_value(&self, key: &String) -> Result { [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] 23 ~ fn get_variable_value(&self, key: &str) -> Result { [INFO] [stdout] 24 ~ match key { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | .ok_or(format!("Evaluated json must contains geometry.type")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains geometry.type".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:59:14 [INFO] [stdout] | [INFO] [stdout] 59 | .ok_or(format!("Evaluated json must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:61:14 [INFO] [stdout] | [INFO] [stdout] 61 | .ok_or(format!("Evaluated json must contains a geometry object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains a geometry object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:63:14 [INFO] [stdout] | [INFO] [stdout] 63 | .ok_or(format!("Evaluated json geometry must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json geometry must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:65:14 [INFO] [stdout] | [INFO] [stdout] 65 | .ok_or(format!("Evaluated json must contains geometry.type")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains geometry.type".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:77:14 [INFO] [stdout] | [INFO] [stdout] 77 | .ok_or(format!("Evaluated json must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | .ok_or(format!("Evaluated json must contains a properties object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains a properties object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:81:14 [INFO] [stdout] | [INFO] [stdout] 81 | .ok_or(format!("Evaluated json properties must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json properties must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/tokenizer.rs:53:15 [INFO] [stdout] | [INFO] [stdout] 53 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/tokenizer.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/git.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / return Git { [INFO] [stdout] 13 | | workdir: Repository::discover(".") [INFO] [stdout] 14 | | .expect_exit("This is not a git repository. Make sure to be in a git folder") [INFO] [stdout] 15 | | .workdir() [INFO] [stdout] 16 | | .expect("Git working directory not found. Should not happen.") [INFO] [stdout] 17 | | .to_path_buf(), [INFO] [stdout] 18 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 12 ~ Git { [INFO] [stdout] 13 + workdir: Repository::discover(".") [INFO] [stdout] 14 + .expect_exit("This is not a git repository. Make sure to be in a git folder") [INFO] [stdout] 15 + .workdir() [INFO] [stdout] 16 + .expect("Git working directory not found. Should not happen.") [INFO] [stdout] 17 + .to_path_buf(), [INFO] [stdout] 18 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/repo/walk.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | / if is_geojson && (self.with_alt || !is_altname) { [INFO] [stdout] 66 | | if !self.should_skip(path.path()).unwrap_or(true) { [INFO] [stdout] 67 | | return Some(Ok(path)); [INFO] [stdout] 68 | | } [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 65 ~ if is_geojson && (self.with_alt || !is_altname) [INFO] [stdout] 66 ~ && !self.should_skip(path.path()).unwrap_or(true) { [INFO] [stdout] 67 | return Some(Ok(path)); [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/repo/walk.rs:73:57 [INFO] [stdout] | [INFO] [stdout] 73 | return Some(Err(err.into_io_error().unwrap_or(std::io::Error::new( [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 74 | | std::io::ErrorKind::Other, [INFO] [stdout] 75 | | "file system loop found", [INFO] [stdout] 76 | | )))) [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 73 ~ return Some(Err(err.into_io_error().unwrap_or(std::io::Error::other( [INFO] [stdout] 74 ~ "file system loop found", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | &mut self.writer [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.writer` [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 creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:155:31 [INFO] [stdout] | [INFO] [stdout] 155 | let force = self.key == String::from("coordinates") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"coordinates"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:156:24 [INFO] [stdout] | [INFO] [stdout] 156 | || self.key == String::from("bbox") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"bbox"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:157:24 [INFO] [stdout] | [INFO] [stdout] 157 | || self.key == String::from("geom:area") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:area"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:158:24 [INFO] [stdout] | [INFO] [stdout] 158 | || self.key == String::from("geom:area_square_m") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:area_square_m"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:159:24 [INFO] [stdout] | [INFO] [stdout] 159 | || self.key == String::from("geom:latitude") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:latitude"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:160:24 [INFO] [stdout] | [INFO] [stdout] 160 | || self.key == String::from("geom:longitude"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:longitude"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:198:46 [INFO] [stdout] | [INFO] [stdout] 198 | WOFGenerator::ugly(&mut writer).write_json(&json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:204:48 [INFO] [stdout] | [INFO] [stdout] 204 | WOFGenerator::ugly(&mut writer).write_object(&object) [INFO] [stdout] | ^^^^^^^ help: change this to: `object` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:216:48 [INFO] [stdout] | [INFO] [stdout] 216 | WOFGenerator::pretty(&mut writer).write_json(&json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:222:50 [INFO] [stdout] | [INFO] [stdout] 222 | WOFGenerator::pretty(&mut writer).write_object(&object) [INFO] [stdout] | ^^^^^^^ help: change this to: `object` [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: unneeded `return` statement [INFO] [stdout] --> src/de.rs:29:15 [INFO] [stdout] | [INFO] [stdout] 29 | Err(e) => return Err(format!("{}", e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 29 - Err(e) => return Err(format!("{}", e)), [INFO] [stdout] 29 + Err(e) => Err(format!("{}", e)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/de.rs:37:15 [INFO] [stdout] | [INFO] [stdout] 37 | Err(e) => return Err(format!("{}", e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 37 - Err(e) => return Err(format!("{}", e)), [INFO] [stdout] 37 + Err(e) => Err(format!("{}", e)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/de.rs:35:21 [INFO] [stdout] | [INFO] [stdout] 35 | match json::parse(&buffer) { [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | let geometry = export_geometry(&json)?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:8:38 [INFO] [stdout] | [INFO] [stdout] 8 | let properties = export_porperties(&json, &geometry.as_object().unwrap())?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:8:45 [INFO] [stdout] | [INFO] [stdout] 8 | let properties = export_porperties(&json, &geometry.as_object().unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `geometry.as_object().unwrap()` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | let id = export_id(&json)?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:10:26 [INFO] [stdout] | [INFO] [stdout] 10 | let bbox = export_bbox(&json)?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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: useless use of `format!` [INFO] [stdout] --> src/export.rs:116:16 [INFO] [stdout] | [INFO] [stdout] 116 | return Err(format!("`coordinates` key must be an array.")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"`coordinates` key must be an array.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/export.rs:151:24 [INFO] [stdout] | [INFO] [stdout] 151 | None => return Err(format!("In `geometry`, `type` key is required.")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"In `geometry`, `type` key is required.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/export.rs:162:3 [INFO] [stdout] | [INFO] [stdout] 162 | / if let Some(id) = properties.as_object().unwrap().get("wof:id") { [INFO] [stdout] 163 | | if id.is_number() { [INFO] [stdout] 164 | | return Ok(id.as_i64().unwrap()); [INFO] [stdout] 165 | | } [INFO] [stdout] 166 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 162 ~ if let Some(id) = properties.as_object().unwrap().get("wof:id") [INFO] [stdout] 163 ~ && id.is_number() { [INFO] [stdout] 164 | return Ok(id.as_i64().unwrap()); [INFO] [stdout] 165 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/fix.rs:40:14 [INFO] [stdout] | [INFO] [stdout] 40 | .ok_or(format!("Input sinot a GeoJSON"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Input sinot a GeoJSON".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/fix.rs:42:14 [INFO] [stdout] | [INFO] [stdout] 42 | .ok_or(format!("`properties` key not found in GeoJSON"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"`properties` key not found in GeoJSON".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/fix.rs:44:14 [INFO] [stdout] | [INFO] [stdout] 44 | .ok_or(format!("`properties` key is not an object in GeoJSON"))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"`properties` key is not an object in GeoJSON".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/postgres/mod.rs:48:42 [INFO] [stdout] | [INFO] [stdout] 48 | let json = crate::parse_file_to_json(path.as_ref().to_path_buf())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `path.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `src` after checking its variant with `is_some` [INFO] [stdout] --> src/postgres/mod.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 94 | if src.is_some() && dst.is_some() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 95 | let src = src.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `dst` after checking its variant with `is_some` [INFO] [stdout] --> src/postgres/mod.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 94 | if src.is_some() && dst.is_some() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 95 | let src = src.unwrap(); [INFO] [stdout] 96 | let dst = dst.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/shapefile/mod.rs:146:31 [INFO] [stdout] | [INFO] [stdout] 146 | pub fn coords_to_point(point: &Vec) -> Point { [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] 146 - pub fn coords_to_point(point: &Vec) -> Point { [INFO] [stdout] 146 + pub fn coords_to_point(point: &[f64]) -> Point { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shapefile/mod.rs:165:33 [INFO] [stdout] | [INFO] [stdout] 165 | parts.push(coords_to_points(&polyline)); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `polyline` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/shapefile/mod.rs:170:37 [INFO] [stdout] | [INFO] [stdout] 170 | fn coords_to_polygon_rings(polygon: &Vec>>) -> 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] 170 - fn coords_to_polygon_rings(polygon: &Vec>>) -> Vec> { [INFO] [stdout] 170 + fn coords_to_polygon_rings(polygon: &[Vec>]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shapefile/mod.rs:176:45 [INFO] [stdout] | [INFO] [stdout] 176 | PolygonRing::Outer(coords_to_points(&polyline)) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `polyline` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shapefile/mod.rs:178:45 [INFO] [stdout] | [INFO] [stdout] 178 | PolygonRing::Inner(coords_to_points(&polyline)) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `polyline` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/shapefile/mod.rs:188:47 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn coords_to_multi_polygon(multi_polygon: &Vec>>>) -> Polygon { [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] 188 - pub fn coords_to_multi_polygon(multi_polygon: &Vec>>>) -> Polygon { [INFO] [stdout] 188 + pub fn coords_to_multi_polygon(multi_polygon: &[Vec>>]) -> Polygon { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/sqlite/mod.rs:99:42 [INFO] [stdout] | [INFO] [stdout] 99 | let json = crate::parse_file_to_json(path.as_ref().to_path_buf())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `path.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/sqlite/mod.rs:151:12 [INFO] [stdout] | [INFO] [stdout] 151 | if let Ok(_) = if self.opts.pretty { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 151 ~ if (if self.opts.pretty { [INFO] [stdout] 152 + doc.pretty(&mut input) [INFO] [stdout] 153 + } else { [INFO] [stdout] 154 + doc.dump(&mut input) [INFO] [stdout] 155 ~ }).is_ok() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sqlite/mod.rs:310:51 [INFO] [stdout] | [INFO] [stdout] 310 | if let Predicate::Boolean(true) = json.eval(&predicate)? { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `predicate` [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: empty string literal in `writeln!` [INFO] [stdout] --> src/sqlite/mod.rs:312:9 [INFO] [stdout] | [INFO] [stdout] 312 | writeln!(&mut writer, "").stringify_err("Can't write to output")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: float has excessive precision [INFO] [stdout] --> src/utils/compute.rs:6:25 [INFO] [stdout] | [INFO] [stdout] 6 | const DEG_TO_RAD: f64 = 0.0174532925199432958; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stdout] = note: `#[warn(clippy::excessive_precision)]` on by default [INFO] [stdout] help: consider changing the type or truncating it to [INFO] [stdout] | [INFO] [stdout] 6 - const DEG_TO_RAD: f64 = 0.0174532925199432958; [INFO] [stdout] 6 + const DEG_TO_RAD: f64 = 0.017_453_292_519_943_295; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `polyline` [INFO] [stdout] --> src/utils/compute.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 84 | for i in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 84 - for i in 0..len { [INFO] [stdout] 84 + for in polyline.iter().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils/compute.rs:97:3 [INFO] [stdout] | [INFO] [stdout] 97 | return (x / (len as f64), y / (len as f64)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 97 - return (x / (len as f64), y / (len as f64)); [INFO] [stdout] 97 + (x / (len as f64), y / (len as f64)) [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/utils/compute.rs:100:33 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn proj_4326_to_3410(coord: &Vec) -> 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] 100 - pub fn proj_4326_to_3410(coord: &Vec) -> Vec { [INFO] [stdout] 100 + pub fn proj_4326_to_3410(coord: &[f64]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:104:3 [INFO] [stdout] | [INFO] [stdout] 104 | lng = lng * DEG_TO_RAD; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lng *= DEG_TO_RAD` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:105:3 [INFO] [stdout] | [INFO] [stdout] 105 | lat = lat * DEG_TO_RAD; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lat *= DEG_TO_RAD` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:107:3 [INFO] [stdout] | [INFO] [stdout] 107 | lng = lng * SCALE_FACTOR; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lng *= SCALE_FACTOR` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:110:3 [INFO] [stdout] | [INFO] [stdout] 110 | lng = lng * TOTAL_SCALE_3410; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lng *= TOTAL_SCALE_3410` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:111:3 [INFO] [stdout] | [INFO] [stdout] 111 | lat = lat * TOTAL_SCALE_3410; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lat *= TOTAL_SCALE_3410` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/compute.rs:146:45 [INFO] [stdout] | [INFO] [stdout] 146 | (self.windows(2).map(|pts| compute_diff(&pts)).sum::() / 2.0f64).abs() [INFO] [stdout] | ^^^^ help: change this to: `pts` [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: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:351:13 [INFO] [stdout] | [INFO] [stdout] 351 | x = x + area_frac * px; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x += area_frac * px` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:352:13 [INFO] [stdout] | [INFO] [stdout] 352 | y = y + area_frac * py; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `y += area_frac * py` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:424:13 [INFO] [stdout] | [INFO] [stdout] 424 | idx = idx + 1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `idx += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/json.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | &self [INFO] [stdout] | ^^^^^ help: change this to: `self` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/json.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | &self [INFO] [stdout] | ^^^^^ help: change this to: `self` [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 loop could be written as a `for` loop [INFO] [stdout] --> src/utils/path.rs:14:3 [INFO] [stdout] | [INFO] [stdout] 14 | while let Some(c) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in chars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/utils/path.rs:21:6 [INFO] [stdout] | [INFO] [stdout] 21 | if s.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.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: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/utils/path.rs:82:11 [INFO] [stdout] | [INFO] [stdout] 82 | .join(Path::new(&id.to_string()).to_path_buf()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Path::new(&id.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wof.rs:96:36 [INFO] [stdout] | [INFO] [stdout] 96 | Some(JsonValue::Array(a)) => a.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!a.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: match expression looks like `matches!` macro [INFO] [stdout] --> src/wof.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | / match self.properties.get("src:alt_label") { [INFO] [stdout] 129 | | Some(JsonValue::String(_)) => true, [INFO] [stdout] 130 | | _ => false, [INFO] [stdout] 131 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 128 - match self.properties.get("src:alt_label") { [INFO] [stdout] 129 - Some(JsonValue::String(_)) => true, [INFO] [stdout] 130 - _ => false, [INFO] [stdout] 131 - } [INFO] [stdout] 128 + matches!(self.properties.get("src:alt_label"), Some(JsonValue::String(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:189:12 [INFO] [stdout] | [INFO] [stdout] 189 | if !cap.name("lang").is_some() || !cap.name("variant").is_some() || !wof_names.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap.name("lang").is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:189:43 [INFO] [stdout] | [INFO] [stdout] 189 | if !cap.name("lang").is_some() || !cap.name("variant").is_some() || !wof_names.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap.name("variant").is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:189:77 [INFO] [stdout] | [INFO] [stdout] 189 | if !cap.name("lang").is_some() || !cap.name("variant").is_some() || !wof_names.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `wof_names.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:219:14 [INFO] [stdout] | [INFO] [stdout] 219 | if !hierarchy.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `hierarchy.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:224:18 [INFO] [stdout] | [INFO] [stdout] 224 | if !cap.name("placetype").is_some() || !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap.name("placetype").is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:224:54 [INFO] [stdout] | [INFO] [stdout] 224 | if !cap.name("placetype").is_some() || !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `id.as_i32().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wof.rs:215:5 [INFO] [stdout] | [INFO] [stdout] 215 | / if let Some(wof_hierarchy) = self.properties.get("wof:hierarchy") { [INFO] [stdout] 216 | | if let Some(hierarchies) = wof_hierarchy.as_array() { [INFO] [stdout] 217 | | for hierarchy in hierarchies { [INFO] [stdout] 218 | | let hierarchy = hierarchy.as_object(); [INFO] [stdout] ... | [INFO] [stdout] 235 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 215 ~ if let Some(wof_hierarchy) = self.properties.get("wof:hierarchy") [INFO] [stdout] 216 ~ && let Some(hierarchies) = wof_hierarchy.as_array() { [INFO] [stdout] 217 | for hierarchy in hierarchies { [INFO] [stdout] ... [INFO] [stdout] 233 | } [INFO] [stdout] 234 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:244:14 [INFO] [stdout] | [INFO] [stdout] 244 | if !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `id.as_i32().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wof.rs:241:5 [INFO] [stdout] | [INFO] [stdout] 241 | / if let Some(wof_concordances) = self.properties.get("wof:concordances") { [INFO] [stdout] 242 | | if let Some(wof_concordances) = wof_concordances.as_object() { [INFO] [stdout] 243 | | for (source, id) in wof_concordances.iter() { [INFO] [stdout] 244 | | if !id.as_i32().is_some() { [INFO] [stdout] ... | [INFO] [stdout] 250 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 241 ~ if let Some(wof_concordances) = self.properties.get("wof:concordances") [INFO] [stdout] 242 ~ && let Some(wof_concordances) = wof_concordances.as_object() { [INFO] [stdout] 243 | for (source, id) in wof_concordances.iter() { [INFO] [stdout] ... [INFO] [stdout] 248 | } [INFO] [stdout] 249 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:309:14 [INFO] [stdout] | [INFO] [stdout] 309 | if !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `id.as_i32().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wof.rs:306:5 [INFO] [stdout] | [INFO] [stdout] 306 | / if let Some(wof_belongs_to) = self.properties.get("wof:belongsto") { [INFO] [stdout] 307 | | if let Some(wof_belongs_to) = wof_belongs_to.as_array() { [INFO] [stdout] 308 | | for id in wof_belongs_to.iter() { [INFO] [stdout] 309 | | if !id.as_i32().is_some() { [INFO] [stdout] ... | [INFO] [stdout] 315 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 306 ~ if let Some(wof_belongs_to) = self.properties.get("wof:belongsto") [INFO] [stdout] 307 ~ && let Some(wof_belongs_to) = wof_belongs_to.as_array() { [INFO] [stdout] 308 | for id in wof_belongs_to.iter() { [INFO] [stdout] ... [INFO] [stdout] 313 | } [INFO] [stdout] 314 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/utils/compute.rs:416:21 [INFO] [stdout] | [INFO] [stdout] 416 | let a = vec![next_pts[0] - cur_pts[0], next_pts[1] - cur_pts[1]]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[next_pts[0] - cur_pts[0], next_pts[1] - cur_pts[1]]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/utils/compute.rs:417:21 [INFO] [stdout] | [INFO] [stdout] 417 | let b = vec![checking[0] - cur_pts[0], checking[1] - cur_pts[1]]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[checking[0] - cur_pts[0], checking[1] - cur_pts[1]]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/wof.rs:259:15 [INFO] [stdout] | [INFO] [stdout] 259 | let lat = vec!["wof:latitude", "geom:latitude"] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["wof:latitude", "geom:latitude"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/wof.rs:270:15 [INFO] [stdout] | [INFO] [stdout] 270 | let lon = vec!["wof:longitude", "geom:longitude"] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["wof:longitude", "geom:longitude"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/wof.rs:180:20 [INFO] [stdout] | [INFO] [stdout] 180 | pub fn get_names(&self) -> Vec { [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] 180 | pub fn get_names(&self) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/build/postgres.rs:71:23 [INFO] [stdout] | [INFO] [stdout] 71 | config.password(&password); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `password` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/commands/build/shapefile.rs:93:42 [INFO] [stdout] | [INFO] [stdout] 93 | let json = crate::parse_file_to_json(path.as_ref().to_path_buf())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `path.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/commands/build/shapefile.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | / if let Some(include) = &self.include { [INFO] [stdout] 105 | | if !include.contains(&geojson.get_placetype()) { [INFO] [stdout] 106 | | return Ok(()); [INFO] [stdout] 107 | | } [INFO] [stdout] 108 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 104 ~ if let Some(include) = &self.include [INFO] [stdout] 105 ~ && !include.contains(&geojson.get_placetype()) { [INFO] [stdout] 106 | return Ok(()); [INFO] [stdout] 107 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/commands/build/shapefile.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 109 | / if let Some(exclude) = &self.exclude { [INFO] [stdout] 110 | | if exclude.contains(&geojson.get_placetype()) { [INFO] [stdout] 111 | | return Ok(()); [INFO] [stdout] 112 | | } [INFO] [stdout] 113 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 109 ~ if let Some(exclude) = &self.exclude [INFO] [stdout] 110 ~ && exclude.contains(&geojson.get_placetype()) { [INFO] [stdout] 111 | return Ok(()); [INFO] [stdout] 112 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/commands/build/sqlite.rs:48:7 [INFO] [stdout] | [INFO] [stdout] 48 | *preset == String::from("pelias") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/commands/build/mod.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/commands/build/mod.rs:65:7 [INFO] [stdout] | [INFO] [stdout] 65 | / for entry in Walk::new(directory.to_string(), false, true) { [INFO] [stdout] 66 | | if let Ok(path) = entry { [INFO] [stdout] 67 | | let p = path.path(); [INFO] [stdout] 68 | | if let Err(e) = add(None, Some(p.to_path_buf())) { [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/commands/build/mod.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | / if let Ok(path) = entry { [INFO] [stdout] 67 | | let p = path.path(); [INFO] [stdout] 68 | | if let Err(e) = add(None, Some(p.to_path_buf())) { [INFO] [stdout] 69 | | error!("Something goes wrong for {}: {}", p.display(), e); [INFO] [stdout] ... | [INFO] [stdout] 73 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 65 ~ for path in Walk::new(directory.to_string(), false, true).flatten() { [INFO] [stdout] 66 + let p = path.path(); [INFO] [stdout] 67 + if let Err(e) = add(None, Some(p.to_path_buf())) { [INFO] [stdout] 68 + error!("Something goes wrong for {}: {}", p.display(), e); [INFO] [stdout] 69 + } else { [INFO] [stdout] 70 + count = count + 1; [INFO] [stdout] 71 + } [INFO] [stdout] 72 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/commands/build/mod.rs:65:30 [INFO] [stdout] | [INFO] [stdout] 65 | for entry in Walk::new(directory.to_string(), false, true) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `directory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/commands/build/mod.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/commands/fetch.rs:36:24 [INFO] [stdout] | [INFO] [stdout] 36 | let countries = if self.countries.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.countries.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: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/commands/fetch.rs:65:46 [INFO] [stdout] | [INFO] [stdout] 65 | download_tar_gz_strip(url.to_string(), download_dest.to_path_buf(), 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `download_dest` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/commands/fix.rs:43:10 [INFO] [stdout] | [INFO] [stdout] 43 | .expect(&format!("Cannot walk directory {}", directory)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot walk directory {}", directory))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/commands/fix.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / for entry in Walk::new(directory.to_string(), true, true) { [INFO] [stdout] 49 | | if let Ok(path) = entry { [INFO] [stdout] 50 | | let mut file = [INFO] [stdout] 51 | | File::open(path.path()).expect_exit(format!("Cannot open file {:?}", path).as_str()); [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/commands/fix.rs:49:7 [INFO] [stdout] | [INFO] [stdout] 49 | / if let Ok(path) = entry { [INFO] [stdout] 50 | | let mut file = [INFO] [stdout] 51 | | File::open(path.path()).expect_exit(format!("Cannot open file {:?}", path).as_str()); [INFO] [stdout] 52 | | let mut buffer = String::new(); [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 48 ~ for path in Walk::new(directory.to_string(), true, true).flatten() { [INFO] [stdout] 49 + let mut file = [INFO] [stdout] 50 + File::open(path.path()).expect_exit(format!("Cannot open file {:?}", path).as_str()); [INFO] [stdout] 51 + let mut buffer = String::new(); [INFO] [stdout] 52 + file.read_to_string(&mut buffer).exit_silently(); [INFO] [stdout] 53 + let mut json = crate::parse_string_to_json(&buffer).exit_silently(); [INFO] [stdout] 54 + if fix.fix(&mut json)? { [INFO] [stdout] 55 + let mut file = File::create(path.path()) [INFO] [stdout] 56 + .expect_exit(format!("Cannot create file {:?}", path).as_str()); [INFO] [stdout] 57 + crate::ser::json_to_writer(&json, &mut file) [INFO] [stdout] 58 + .expect_exit(format!("Cannot write to file {:?}", path).as_str()); [INFO] [stdout] 59 + } [INFO] [stdout] 60 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/commands/fix.rs:48:28 [INFO] [stdout] | [INFO] [stdout] 48 | for entry in Walk::new(directory.to_string(), true, true) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `directory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/git.rs:24:35 [INFO] [stdout] | [INFO] [stdout] 24 | git.get_changes_from_commit(&commit) [INFO] [stdout] | ^^^^^^^ help: change this to: `commit` [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: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/commands/git.rs:34:31 [INFO] [stdout] | [INFO] [stdout] 34 | pub fn display(&self, path: &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] 34 - pub fn display(&self, path: &PathBuf) { [INFO] [stdout] 34 + pub fn display(&self, path: &Path) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/commands/git.rs:48:15 [INFO] [stdout] | [INFO] [stdout] 48 | format: format!("id"), [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using `.to_string()`: `"id".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/commands/list.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | / for entry in Walk::new(directory.to_string(), self.alt, !self.no_deprecated) { [INFO] [stdout] 52 | | if let Ok(path) = entry { [INFO] [stdout] 53 | | if self.print_geojson { [INFO] [stdout] 54 | | let mut file = std::fs::File::open(path.path()).exit_silently(); [INFO] [stdout] ... | [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/commands/list.rs:52:7 [INFO] [stdout] | [INFO] [stdout] 52 | / if let Ok(path) = entry { [INFO] [stdout] 53 | | if self.print_geojson { [INFO] [stdout] 54 | | let mut file = std::fs::File::open(path.path()).exit_silently(); [INFO] [stdout] 55 | | let mut buffer = String::new(); [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 51 ~ for path in Walk::new(directory.to_string(), self.alt, !self.no_deprecated).flatten() { [INFO] [stdout] 52 + if self.print_geojson { [INFO] [stdout] 53 + let mut file = std::fs::File::open(path.path()).exit_silently(); [INFO] [stdout] 54 + let mut buffer = String::new(); [INFO] [stdout] 55 + file.read_to_string(&mut buffer).exit_silently(); [INFO] [stdout] 56 + let json = crate::parse_string_to_json(&buffer).exit_silently(); [INFO] [stdout] 57 + if let Predicate::Boolean(true) = json [INFO] [stdout] 58 + .eval(&predicate) [INFO] [stdout] 59 + .expect_exit("Can't evaluate expression") [INFO] [stdout] 60 + { [INFO] [stdout] 61 + crate::ser::json_to_writer(&json, &mut std::io::stdout()).exit_silently(); [INFO] [stdout] 62 + writeln!(std::io::stdout(), "").exit_silently() [INFO] [stdout] 63 + } [INFO] [stdout] 64 + } else { [INFO] [stdout] 65 + writeln!(std::io::stdout(), "{}", path.path().display()).exit_silently(); [INFO] [stdout] 66 + } [INFO] [stdout] 67 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/commands/list.rs:51:28 [INFO] [stdout] | [INFO] [stdout] 51 | for entry in Walk::new(directory.to_string(), self.alt, !self.no_deprecated) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `directory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/list.rs:59:19 [INFO] [stdout] | [INFO] [stdout] 59 | .eval(&predicate) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `predicate` [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: empty string literal in `writeln!` [INFO] [stdout] --> src/commands/list.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | writeln!(std::io::stdout(), "").exit_silently() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` 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/commands/list.rs:86:53 [INFO] [stdout] | [INFO] [stdout] 86 | .write_all_geojsons(&mut std::io::stdout(), &predicate) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `predicate` [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: manual implementation of an assign operation [INFO] [stdout] --> src/commands/patch.rs:76:7 [INFO] [stdout] | [INFO] [stdout] 76 | cpt = cpt + 1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `cpt += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/commands/patch.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | / for entry in Walk::json_or_geojson(directory.to_string()) { [INFO] [stdout] 82 | | if let Ok(path) = entry { [INFO] [stdout] 83 | | let mut file = std::fs::File::open(path.path()) [INFO] [stdout] 84 | | .expect_exit(&format!("Can't open file {:?}", path.path())); [INFO] [stdout] ... | [INFO] [stdout] 96 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/commands/patch.rs:82:7 [INFO] [stdout] | [INFO] [stdout] 82 | / if let Ok(path) = entry { [INFO] [stdout] 83 | | let mut file = std::fs::File::open(path.path()) [INFO] [stdout] 84 | | .expect_exit(&format!("Can't open file {:?}", path.path())); [INFO] [stdout] 85 | | let mut buffer = String::new(); [INFO] [stdout] ... | [INFO] [stdout] 94 | | )); [INFO] [stdout] 95 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 81 ~ for path in Walk::json_or_geojson(directory.to_string()).flatten() { [INFO] [stdout] 82 + let mut file = std::fs::File::open(path.path()) [INFO] [stdout] 83 + .expect_exit(&format!("Can't open file {:?}", path.path())); [INFO] [stdout] 84 + let mut buffer = String::new(); [INFO] [stdout] 85 + file [INFO] [stdout] 86 + .read_to_string(&mut buffer) [INFO] [stdout] 87 + .expect_exit(&format!("Can't open file {:?}", path.path())); [INFO] [stdout] 88 + self [INFO] [stdout] 89 + .apply_buffer_patch(&buffer, &sqlite) [INFO] [stdout] 90 + .expect_exit(&format!( [INFO] [stdout] 91 + "Something goes wrong with patch {:?}", [INFO] [stdout] 92 + path.path() [INFO] [stdout] 93 + )); [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/commands/patch.rs:81:40 [INFO] [stdout] | [INFO] [stdout] 81 | for entry in Walk::json_or_geojson(directory.to_string()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `directory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:90:40 [INFO] [stdout] | [INFO] [stdout] 90 | .apply_buffer_patch(&buffer, &sqlite) [INFO] [stdout] | ^^^^^^^ help: change this to: `sqlite` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:122:38 [INFO] [stdout] | [INFO] [stdout] 122 | Patch::apply_patch_to_original(&json, &mut original_json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:138:38 [INFO] [stdout] | [INFO] [stdout] 138 | Patch::apply_patch_to_original(&json, &mut original_json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:167:61 [INFO] [stdout] | [INFO] [stdout] 167 | Patch::apply_patch_all_names(original_properties, &value)?; [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:169:63 [INFO] [stdout] | [INFO] [stdout] 169 | Patch::set_property_value(original_properties, key, &value)?; [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:183:48 [INFO] [stdout] | [INFO] [stdout] 183 | let wof = WOFGeoJSON::as_valid_wof_geojson(&original)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `original` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/patch.rs:214:59 [INFO] [stdout] | [INFO] [stdout] 214 | Patch::set_property_value(original_properties, key, &value)? [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/commands/print.rs:41:18 [INFO] [stdout] | [INFO] [stdout] 41 | let sqlite = if let Some(sqlite_path) = &self.sqlite { [INFO] [stdout] | __________________^ [INFO] [stdout] 42 | | Some(SQLite::new(sqlite_path, SQLiteOpts::default()).expect_exit("Can't open the database.")) [INFO] [stdout] 43 | | } else { [INFO] [stdout] 44 | | None [INFO] [stdout] 45 | | }; [INFO] [stdout] | |_____^ help: try: `self.sqlite.as_ref().map(|sqlite_path| SQLite::new(sqlite_path, SQLiteOpts::default()).expect_exit("Can't open the database."))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` 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/commands/print.rs:51:34 [INFO] [stdout] | [INFO] [stdout] 51 | self.print_from_database(&db, id); [INFO] [stdout] | ^^^ help: change this to: `db` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/print.rs:53:32 [INFO] [stdout] | [INFO] [stdout] 53 | self.print_from_string(&id); [INFO] [stdout] | ^^^ help: change this to: `id` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/print.rs:70:38 [INFO] [stdout] | [INFO] [stdout] 70 | self.print_from_database(&db, id); [INFO] [stdout] | ^^^ help: change this to: `db` [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 `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/commands/print.rs:126:61 [INFO] [stdout] | [INFO] [stdout] 126 | fn print_json(&self, json: &mut JsonValue, message_error: &String) { [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] 126 ~ fn print_json(&self, json: &mut JsonValue, message_error: &str) { [INFO] [stdout] 127 ~ let obj = json.as_mut_object().expect_exit(message_error); [INFO] [stdout] 128 | if self.no_geom { [INFO] [stdout] ... [INFO] [stdout] 148 | if !self.no_pretty { [INFO] [stdout] 149 ~ json_to_writer_pretty(&json, &mut std::io::stdout()).expect_exit(message_error); [INFO] [stdout] 150 | } else { [INFO] [stdout] 151 ~ json_to_writer(&json, &mut std::io::stdout()).expect_exit(message_error); [INFO] [stdout] 152 ~ writeln!(std::io::stdout(), "").expect_exit(message_error); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/print.rs:149:29 [INFO] [stdout] | [INFO] [stdout] 149 | json_to_writer_pretty(&json, &mut std::io::stdout()).expect_exit(message_error.as_str()); [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/print.rs:151:22 [INFO] [stdout] | [INFO] [stdout] 151 | json_to_writer(&json, &mut std::io::stdout()).expect_exit(message_error.as_str()); [INFO] [stdout] | ^^^^^ help: change this to: `json` [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: empty string literal in `writeln!` [INFO] [stdout] --> src/commands/print.rs:152:7 [INFO] [stdout] | [INFO] [stdout] 152 | writeln!(std::io::stdout(), "").expect_exit(message_error.as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/mod.rs:75:26 [INFO] [stdout] | [INFO] [stdout] 75 | Command::push_args(&mut cmd_args, raw_cmd, elt); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `cmd_args` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands/mod.rs:95:25 [INFO] [stdout] | [INFO] [stdout] 95 | Command::push_arg(&mut cmd_args, raw_cmd, elt); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `cmd_args` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/mod.rs:112:45 [INFO] [stdout] | [INFO] [stdout] 112 | if let Err(e) = std::fs::create_dir_all(&path) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/mod.rs:135:27 [INFO] [stdout] | [INFO] [stdout] 135 | assert_directory_exists(&dest); [INFO] [stdout] | ^^^^^ help: change this to: `dest` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/commands/mod.rs:143:18 [INFO] [stdout] | [INFO] [stdout] 143 | let reason = if let Some(reason) = status.canonical_reason() { [INFO] [stdout] | __________________^ [INFO] [stdout] 144 | | reason [INFO] [stdout] 145 | | } else { [INFO] [stdout] 146 | | "Download is not a success" [INFO] [stdout] 147 | | }; [INFO] [stdout] | |_____^ help: replace with: `status.canonical_reason().unwrap_or("Download is not a success")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/mod.rs:205:8 [INFO] [stdout] | [INFO] [stdout] 205 | if !entry.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `entry.is_err()` [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] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/commands/mod.rs:191:18 [INFO] [stdout] | [INFO] [stdout] 191 | let reason = if let Some(reason) = status.canonical_reason() { [INFO] [stdout] | __________________^ [INFO] [stdout] 192 | | reason [INFO] [stdout] 193 | | } else { [INFO] [stdout] 194 | | "Download is not a success" [INFO] [stdout] 195 | | }; [INFO] [stdout] | |_____^ help: replace with: `status.canonical_reason().unwrap_or("Download is not a success")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/commands/mod.rs:228:12 [INFO] [stdout] | [INFO] [stdout] 228 | if let Err(_) = entry.read_to_string(&mut buffer) { [INFO] [stdout] | -------^^^^^^------------------------------------ help: try: `if entry.read_to_string(&mut buffer).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/commands/mod.rs:235:7 [INFO] [stdout] | [INFO] [stdout] 235 | writeln!(std::io::stdout(), "").exit_silently(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/commands/mod.rs:243:5 [INFO] [stdout] | [INFO] [stdout] 243 | / if libc::isatty(libc::STDIN_FILENO) == 0 { [INFO] [stdout] 244 | | true [INFO] [stdout] 245 | | } else { [INFO] [stdout] 246 | | false [INFO] [stdout] 247 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `libc::isatty(libc::STDIN_FILENO) == 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/commands/mod.rs:253:5 [INFO] [stdout] | [INFO] [stdout] 253 | / if libc::isatty(libc::STDOUT_FILENO) == 0 { [INFO] [stdout] 254 | | true [INFO] [stdout] 255 | | } else { [INFO] [stdout] 256 | | false [INFO] [stdout] 257 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `libc::isatty(libc::STDOUT_FILENO) == 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/de.rs:12:43 [INFO] [stdout] | [INFO] [stdout] 12 | let (mut predicate, mut index) = _parse(&tokens, index)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/de.rs:16:33 [INFO] [stdout] | [INFO] [stdout] 16 | let (right, i) = _parse(&tokens, index + 1)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `tokens` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/expression/de.rs:36:19 [INFO] [stdout] | [INFO] [stdout] 36 | fn _parse(tokens: &Vec, mut index: usize) -> Result<(Predicate, usize), String> { [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] 36 - fn _parse(tokens: &Vec, mut index: usize) -> Result<(Predicate, usize), String> { [INFO] [stdout] 36 + fn _parse(tokens: &[Token], mut index: usize) -> Result<(Predicate, usize), String> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/de.rs:40:7 [INFO] [stdout] | [INFO] [stdout] 40 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/de.rs:43:11 [INFO] [stdout] | [INFO] [stdout] 43 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/de.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/de.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | parse(format!("variable = 'true'"))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = 'true'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/de.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | parse(format!("0.6 <> true"))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"0.6 <> true".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/de.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | parse(format!("variable = true AND variable = false"))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = true AND variable = false".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/de.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | parse(format!("variable = true AND variable <> false AND v2 = 32"))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = true AND variable <> false AND v2 = 32".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/de.rs:119:13 [INFO] [stdout] | [INFO] [stdout] 119 | parse(format!("v1 = 1 AND v2 <> 2 OR v3 = 3 AND v4 <> 4"))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"v1 = 1 AND v2 <> 2 OR v3 = 3 AND v4 <> 4".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | self.eval(&left)?.as_bool()? && self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^ help: change this to: `left` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:10:51 [INFO] [stdout] | [INFO] [stdout] 10 | self.eval(&left)?.as_bool()? && self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | self.eval(&left)?.as_bool()? || self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^ help: change this to: `left` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:13:51 [INFO] [stdout] | [INFO] [stdout] 13 | self.eval(&left)?.as_bool()? || self.eval(&right)?.as_bool()?, [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:15:69 [INFO] [stdout] | [INFO] [stdout] 15 | Predicate::Eq(left, right) => Ok(Predicate::Boolean(self.eval(&left)? == self.eval(&right)?)), [INFO] [stdout] | ^^^^^ help: change this to: `left` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:15:90 [INFO] [stdout] | [INFO] [stdout] 15 | Predicate::Eq(left, right) => Ok(Predicate::Boolean(self.eval(&left)? == self.eval(&right)?)), [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/expression/evaluate.rs:16:70 [INFO] [stdout] | [INFO] [stdout] 16 | Predicate::Not(predicate) => Ok(Predicate::Boolean(!(self.eval(&predicate)?.as_bool()?))), [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `predicate` [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 `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/expression/evaluate.rs:23:37 [INFO] [stdout] | [INFO] [stdout] 23 | fn get_variable_value(&self, key: &String) -> Result { [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] 23 ~ fn get_variable_value(&self, key: &str) -> Result { [INFO] [stdout] 24 ~ match key { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | .ok_or(format!("Evaluated json must contains geometry.type")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains geometry.type".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:59:14 [INFO] [stdout] | [INFO] [stdout] 59 | .ok_or(format!("Evaluated json must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:61:14 [INFO] [stdout] | [INFO] [stdout] 61 | .ok_or(format!("Evaluated json must contains a geometry object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains a geometry object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:63:14 [INFO] [stdout] | [INFO] [stdout] 63 | .ok_or(format!("Evaluated json geometry must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json geometry must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:65:14 [INFO] [stdout] | [INFO] [stdout] 65 | .ok_or(format!("Evaluated json must contains geometry.type")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains geometry.type".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:77:14 [INFO] [stdout] | [INFO] [stdout] 77 | .ok_or(format!("Evaluated json must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | .ok_or(format!("Evaluated json must contains a properties object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json must contains a properties object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:81:14 [INFO] [stdout] | [INFO] [stdout] 81 | .ok_or(format!("Evaluated json properties must be an object!"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Evaluated json properties must be an object!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:132:41 [INFO] [stdout] | [INFO] [stdout] 132 | wof_obj.eval(&Predicate::try_from(format!("geom_type = 'Polygon'"))?)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"geom_type = 'Polygon'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:136:38 [INFO] [stdout] | [INFO] [stdout] 136 | json.eval(&Predicate::try_from(format!("geom_type = 'Polygon'"))?)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"geom_type = 'Polygon'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:141:41 [INFO] [stdout] | [INFO] [stdout] 141 | wof_obj.eval(&Predicate::try_from(format!( [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 142 | | "wof:placetype = 'localadmin'" [INFO] [stdout] 143 | | ))?)?, [INFO] [stdout] | |_______^ help: consider using `.to_string()`: `"wof:placetype = 'localadmin'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:147:38 [INFO] [stdout] | [INFO] [stdout] 147 | json.eval(&Predicate::try_from(format!( [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 148 | | "wof:placetype = 'localadmin'" [INFO] [stdout] 149 | | ))?)?, [INFO] [stdout] | |_______^ help: consider using `.to_string()`: `"wof:placetype = 'localadmin'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:154:41 [INFO] [stdout] | [INFO] [stdout] 154 | wof_obj.eval(&Predicate::try_from(format!("wof:id = 101748927"))?)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"wof:id = 101748927".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:158:38 [INFO] [stdout] | [INFO] [stdout] 158 | json.eval(&Predicate::try_from(format!("wof:id = 101748927"))?)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"wof:id = 101748927".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:163:41 [INFO] [stdout] | [INFO] [stdout] 163 | wof_obj.eval(&Predicate::try_from(format!("geom:src = 'osm'"))?)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"geom:src = 'osm'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:167:38 [INFO] [stdout] | [INFO] [stdout] 167 | json.eval(&Predicate::try_from(format!("geom:src = 'osm'"))?)?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"geom:src = 'osm'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:172:41 [INFO] [stdout] | [INFO] [stdout] 172 | wof_obj.eval(&Predicate::try_from(format!( [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 173 | | "wof:placetype = wof:placetype" [INFO] [stdout] 174 | | ))?)?, [INFO] [stdout] | |_______^ help: consider using `.to_string()`: `"wof:placetype = wof:placetype".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/evaluate.rs:178:38 [INFO] [stdout] | [INFO] [stdout] 178 | json.eval(&Predicate::try_from(format!( [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 179 | | "wof:placetype = wof:placetype" [INFO] [stdout] 180 | | ))?)?, [INFO] [stdout] | |_______^ help: consider using `.to_string()`: `"wof:placetype = wof:placetype".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/tokenizer.rs:53:15 [INFO] [stdout] | [INFO] [stdout] 53 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/expression/tokenizer.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:134:16 [INFO] [stdout] | [INFO] [stdout] 134 | tokenize(format!("not true")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"not true".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:138:16 [INFO] [stdout] | [INFO] [stdout] 138 | tokenize(format!("in true")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"in true".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:146:16 [INFO] [stdout] | [INFO] [stdout] 146 | tokenize(format!("variable = 'string'")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = 'string'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:154:16 [INFO] [stdout] | [INFO] [stdout] 154 | tokenize(format!("variable = '''string'''")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = '''string'''".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:162:16 [INFO] [stdout] | [INFO] [stdout] 162 | tokenize(format!("variable = 'string with many words'")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = 'string with many words'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:170:16 [INFO] [stdout] | [INFO] [stdout] 170 | tokenize(format!("variable = '''string with many quotes'''")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = '''string with many quotes'''".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:178:16 [INFO] [stdout] | [INFO] [stdout] 178 | tokenize(format!("variable = ' string with'' '' quotes inside '")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = ' string with'' '' quotes inside '".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/tokenizer.rs:186:16 [INFO] [stdout] | [INFO] [stdout] 186 | tokenize(format!("variable = true")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = true".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/expression/mod.rs:47:27 [INFO] [stdout] | [INFO] [stdout] 47 | Predicate::try_from(format!("variable = 'true'"))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"variable = 'true'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/git.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / return Git { [INFO] [stdout] 13 | | workdir: Repository::discover(".") [INFO] [stdout] 14 | | .expect_exit("This is not a git repository. Make sure to be in a git folder") [INFO] [stdout] 15 | | .workdir() [INFO] [stdout] 16 | | .expect("Git working directory not found. Should not happen.") [INFO] [stdout] 17 | | .to_path_buf(), [INFO] [stdout] 18 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 12 ~ Git { [INFO] [stdout] 13 + workdir: Repository::discover(".") [INFO] [stdout] 14 + .expect_exit("This is not a git repository. Make sure to be in a git folder") [INFO] [stdout] 15 + .workdir() [INFO] [stdout] 16 + .expect("Git working directory not found. Should not happen.") [INFO] [stdout] 17 + .to_path_buf(), [INFO] [stdout] 18 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/repo/walk.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | / if is_geojson && (self.with_alt || !is_altname) { [INFO] [stdout] 66 | | if !self.should_skip(path.path()).unwrap_or(true) { [INFO] [stdout] 67 | | return Some(Ok(path)); [INFO] [stdout] 68 | | } [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 65 ~ if is_geojson && (self.with_alt || !is_altname) [INFO] [stdout] 66 ~ && !self.should_skip(path.path()).unwrap_or(true) { [INFO] [stdout] 67 | return Some(Ok(path)); [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/repo/walk.rs:73:57 [INFO] [stdout] | [INFO] [stdout] 73 | return Some(Err(err.into_io_error().unwrap_or(std::io::Error::new( [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 74 | | std::io::ErrorKind::Other, [INFO] [stdout] 75 | | "file system loop found", [INFO] [stdout] 76 | | )))) [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 73 ~ return Some(Err(err.into_io_error().unwrap_or(std::io::Error::other( [INFO] [stdout] 74 ~ "file system loop found", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | &mut self.writer [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `self.writer` [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 creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:155:31 [INFO] [stdout] | [INFO] [stdout] 155 | let force = self.key == String::from("coordinates") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"coordinates"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:156:24 [INFO] [stdout] | [INFO] [stdout] 156 | || self.key == String::from("bbox") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"bbox"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:157:24 [INFO] [stdout] | [INFO] [stdout] 157 | || self.key == String::from("geom:area") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:area"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:158:24 [INFO] [stdout] | [INFO] [stdout] 158 | || self.key == String::from("geom:area_square_m") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:area_square_m"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:159:24 [INFO] [stdout] | [INFO] [stdout] 159 | || self.key == String::from("geom:latitude") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:latitude"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/ser.rs:160:24 [INFO] [stdout] | [INFO] [stdout] 160 | || self.key == String::from("geom:longitude"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"geom:longitude"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:198:46 [INFO] [stdout] | [INFO] [stdout] 198 | WOFGenerator::ugly(&mut writer).write_json(&json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:204:48 [INFO] [stdout] | [INFO] [stdout] 204 | WOFGenerator::ugly(&mut writer).write_object(&object) [INFO] [stdout] | ^^^^^^^ help: change this to: `object` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:216:48 [INFO] [stdout] | [INFO] [stdout] 216 | WOFGenerator::pretty(&mut writer).write_json(&json) [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ser.rs:222:50 [INFO] [stdout] | [INFO] [stdout] 222 | WOFGenerator::pretty(&mut writer).write_object(&object) [INFO] [stdout] | ^^^^^^^ help: change this to: `object` [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: unneeded `return` statement [INFO] [stdout] --> src/de.rs:29:15 [INFO] [stdout] | [INFO] [stdout] 29 | Err(e) => return Err(format!("{}", e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 29 - Err(e) => return Err(format!("{}", e)), [INFO] [stdout] 29 + Err(e) => Err(format!("{}", e)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/de.rs:37:15 [INFO] [stdout] | [INFO] [stdout] 37 | Err(e) => return Err(format!("{}", e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 37 - Err(e) => return Err(format!("{}", e)), [INFO] [stdout] 37 + Err(e) => Err(format!("{}", e)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/de.rs:35:21 [INFO] [stdout] | [INFO] [stdout] 35 | match json::parse(&buffer) { [INFO] [stdout] | ^^^^^^^ help: change this to: `buffer` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | let geometry = export_geometry(&json)?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:8:38 [INFO] [stdout] | [INFO] [stdout] 8 | let properties = export_porperties(&json, &geometry.as_object().unwrap())?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:8:45 [INFO] [stdout] | [INFO] [stdout] 8 | let properties = export_porperties(&json, &geometry.as_object().unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `geometry.as_object().unwrap()` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | let id = export_id(&json)?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/export.rs:10:26 [INFO] [stdout] | [INFO] [stdout] 10 | let bbox = export_bbox(&json)?; [INFO] [stdout] | ^^^^^ help: change this to: `json` [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: useless use of `format!` [INFO] [stdout] --> src/export.rs:116:16 [INFO] [stdout] | [INFO] [stdout] 116 | return Err(format!("`coordinates` key must be an array.")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"`coordinates` key must be an array.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/export.rs:151:24 [INFO] [stdout] | [INFO] [stdout] 151 | None => return Err(format!("In `geometry`, `type` key is required.")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"In `geometry`, `type` key is required.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/export.rs:162:3 [INFO] [stdout] | [INFO] [stdout] 162 | / if let Some(id) = properties.as_object().unwrap().get("wof:id") { [INFO] [stdout] 163 | | if id.is_number() { [INFO] [stdout] 164 | | return Ok(id.as_i64().unwrap()); [INFO] [stdout] 165 | | } [INFO] [stdout] 166 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 162 ~ if let Some(id) = properties.as_object().unwrap().get("wof:id") [INFO] [stdout] 163 ~ && id.is_number() { [INFO] [stdout] 164 | return Ok(id.as_i64().unwrap()); [INFO] [stdout] 165 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/fix.rs:40:14 [INFO] [stdout] | [INFO] [stdout] 40 | .ok_or(format!("Input sinot a GeoJSON"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Input sinot a GeoJSON".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/fix.rs:42:14 [INFO] [stdout] | [INFO] [stdout] 42 | .ok_or(format!("`properties` key not found in GeoJSON"))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"`properties` key not found in GeoJSON".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/fix.rs:44:14 [INFO] [stdout] | [INFO] [stdout] 44 | .ok_or(format!("`properties` key is not an object in GeoJSON"))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"`properties` key is not an object in GeoJSON".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/postgres/mod.rs:48:42 [INFO] [stdout] | [INFO] [stdout] 48 | let json = crate::parse_file_to_json(path.as_ref().to_path_buf())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `path.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `src` after checking its variant with `is_some` [INFO] [stdout] --> src/postgres/mod.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 94 | if src.is_some() && dst.is_some() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 95 | let src = src.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `dst` after checking its variant with `is_some` [INFO] [stdout] --> src/postgres/mod.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 94 | if src.is_some() && dst.is_some() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 95 | let src = src.unwrap(); [INFO] [stdout] 96 | let dst = dst.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/shapefile/mod.rs:146:31 [INFO] [stdout] | [INFO] [stdout] 146 | pub fn coords_to_point(point: &Vec) -> Point { [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] 146 - pub fn coords_to_point(point: &Vec) -> Point { [INFO] [stdout] 146 + pub fn coords_to_point(point: &[f64]) -> Point { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shapefile/mod.rs:165:33 [INFO] [stdout] | [INFO] [stdout] 165 | parts.push(coords_to_points(&polyline)); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `polyline` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/shapefile/mod.rs:170:37 [INFO] [stdout] | [INFO] [stdout] 170 | fn coords_to_polygon_rings(polygon: &Vec>>) -> 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] 170 - fn coords_to_polygon_rings(polygon: &Vec>>) -> Vec> { [INFO] [stdout] 170 + fn coords_to_polygon_rings(polygon: &[Vec>]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shapefile/mod.rs:176:45 [INFO] [stdout] | [INFO] [stdout] 176 | PolygonRing::Outer(coords_to_points(&polyline)) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `polyline` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shapefile/mod.rs:178:45 [INFO] [stdout] | [INFO] [stdout] 178 | PolygonRing::Inner(coords_to_points(&polyline)) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `polyline` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/shapefile/mod.rs:188:47 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn coords_to_multi_polygon(multi_polygon: &Vec>>>) -> Polygon { [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] 188 - pub fn coords_to_multi_polygon(multi_polygon: &Vec>>>) -> Polygon { [INFO] [stdout] 188 + pub fn coords_to_multi_polygon(multi_polygon: &[Vec>>]) -> Polygon { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/sqlite/mod.rs:99:42 [INFO] [stdout] | [INFO] [stdout] 99 | let json = crate::parse_file_to_json(path.as_ref().to_path_buf())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `path.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/sqlite/mod.rs:151:12 [INFO] [stdout] | [INFO] [stdout] 151 | if let Ok(_) = if self.opts.pretty { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 151 ~ if (if self.opts.pretty { [INFO] [stdout] 152 + doc.pretty(&mut input) [INFO] [stdout] 153 + } else { [INFO] [stdout] 154 + doc.dump(&mut input) [INFO] [stdout] 155 ~ }).is_ok() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sqlite/mod.rs:310:51 [INFO] [stdout] | [INFO] [stdout] 310 | if let Predicate::Boolean(true) = json.eval(&predicate)? { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `predicate` [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: empty string literal in `writeln!` [INFO] [stdout] --> src/sqlite/mod.rs:312:9 [INFO] [stdout] | [INFO] [stdout] 312 | writeln!(&mut writer, "").stringify_err("Can't write to output")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: float has excessive precision [INFO] [stdout] --> src/utils/compute.rs:6:25 [INFO] [stdout] | [INFO] [stdout] 6 | const DEG_TO_RAD: f64 = 0.0174532925199432958; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stdout] = note: `#[warn(clippy::excessive_precision)]` on by default [INFO] [stdout] help: consider changing the type or truncating it to [INFO] [stdout] | [INFO] [stdout] 6 - const DEG_TO_RAD: f64 = 0.0174532925199432958; [INFO] [stdout] 6 + const DEG_TO_RAD: f64 = 0.017_453_292_519_943_295; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `polyline` [INFO] [stdout] --> src/utils/compute.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 84 | for i in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 84 - for i in 0..len { [INFO] [stdout] 84 + for in polyline.iter().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils/compute.rs:97:3 [INFO] [stdout] | [INFO] [stdout] 97 | return (x / (len as f64), y / (len as f64)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 97 - return (x / (len as f64), y / (len as f64)); [INFO] [stdout] 97 + (x / (len as f64), y / (len as f64)) [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/utils/compute.rs:100:33 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn proj_4326_to_3410(coord: &Vec) -> 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] 100 - pub fn proj_4326_to_3410(coord: &Vec) -> Vec { [INFO] [stdout] 100 + pub fn proj_4326_to_3410(coord: &[f64]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:104:3 [INFO] [stdout] | [INFO] [stdout] 104 | lng = lng * DEG_TO_RAD; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lng *= DEG_TO_RAD` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:105:3 [INFO] [stdout] | [INFO] [stdout] 105 | lat = lat * DEG_TO_RAD; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lat *= DEG_TO_RAD` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:107:3 [INFO] [stdout] | [INFO] [stdout] 107 | lng = lng * SCALE_FACTOR; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lng *= SCALE_FACTOR` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:110:3 [INFO] [stdout] | [INFO] [stdout] 110 | lng = lng * TOTAL_SCALE_3410; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lng *= TOTAL_SCALE_3410` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:111:3 [INFO] [stdout] | [INFO] [stdout] 111 | lat = lat * TOTAL_SCALE_3410; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lat *= TOTAL_SCALE_3410` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/compute.rs:146:45 [INFO] [stdout] | [INFO] [stdout] 146 | (self.windows(2).map(|pts| compute_diff(&pts)).sum::() / 2.0f64).abs() [INFO] [stdout] | ^^^^ help: change this to: `pts` [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: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:351:13 [INFO] [stdout] | [INFO] [stdout] 351 | x = x + area_frac * px; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x += area_frac * px` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:352:13 [INFO] [stdout] | [INFO] [stdout] 352 | y = y + area_frac * py; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `y += area_frac * py` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/utils/compute.rs:424:13 [INFO] [stdout] | [INFO] [stdout] 424 | idx = idx + 1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `idx += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/utils/compute.rs:458:5 [INFO] [stdout] | [INFO] [stdout] 458 | assert_eq!(a.0 > b.0 - 0.000001 && a.0 < b.0 + 0.000001, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 458 - assert_eq!(a.0 > b.0 - 0.000001 && a.0 < b.0 + 0.000001, true); [INFO] [stdout] 458 + assert!(a.0 > b.0 - 0.000001 && a.0 < b.0 + 0.000001); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/utils/compute.rs:459:5 [INFO] [stdout] | [INFO] [stdout] 459 | assert_eq!(a.1 > b.1 - 0.000001 && a.1 < b.1 + 0.000001, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 459 - assert_eq!(a.1 > b.1 - 0.000001 && a.1 < b.1 + 0.000001, true); [INFO] [stdout] 459 + assert!(a.1 > b.1 - 0.000001 && a.1 < b.1 + 0.000001); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: float has excessive precision [INFO] [stdout] --> src/utils/compute.rs:483:44 [INFO] [stdout] | [INFO] [stdout] 483 | assert_eq!(polygon.compute_area_m(), 3332714287168.220703); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stdout] help: consider changing the type or truncating it to [INFO] [stdout] | [INFO] [stdout] 483 - assert_eq!(polygon.compute_area_m(), 3332714287168.220703); [INFO] [stdout] 483 + assert_eq!(polygon.compute_area_m(), 3_332_714_287_168.220_7); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: float has excessive precision [INFO] [stdout] --> src/utils/compute.rs:511:40 [INFO] [stdout] | [INFO] [stdout] 511 | assert_eq!(obj.compute_area_m(), 3332714287168.220703); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stdout] help: consider changing the type or truncating it to [INFO] [stdout] | [INFO] [stdout] 511 - assert_eq!(obj.compute_area_m(), 3332714287168.220703); [INFO] [stdout] 511 + assert_eq!(obj.compute_area_m(), 3_332_714_287_168.220_7); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/json.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | &self [INFO] [stdout] | ^^^^^ help: change this to: `self` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/json.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | &self [INFO] [stdout] | ^^^^^ help: change this to: `self` [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 loop could be written as a `for` loop [INFO] [stdout] --> src/utils/path.rs:14:3 [INFO] [stdout] | [INFO] [stdout] 14 | while let Some(c) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in chars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/utils/path.rs:21:6 [INFO] [stdout] | [INFO] [stdout] 21 | if s.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.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: unnecessary use of `to_path_buf` [INFO] [stdout] --> src/utils/path.rs:82:11 [INFO] [stdout] | [INFO] [stdout] 82 | .join(Path::new(&id.to_string()).to_path_buf()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Path::new(&id.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/wof.rs:96:36 [INFO] [stdout] | [INFO] [stdout] 96 | Some(JsonValue::Array(a)) => a.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!a.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: match expression looks like `matches!` macro [INFO] [stdout] --> src/wof.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | / match self.properties.get("src:alt_label") { [INFO] [stdout] 129 | | Some(JsonValue::String(_)) => true, [INFO] [stdout] 130 | | _ => false, [INFO] [stdout] 131 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 128 - match self.properties.get("src:alt_label") { [INFO] [stdout] 129 - Some(JsonValue::String(_)) => true, [INFO] [stdout] 130 - _ => false, [INFO] [stdout] 131 - } [INFO] [stdout] 128 + matches!(self.properties.get("src:alt_label"), Some(JsonValue::String(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:189:12 [INFO] [stdout] | [INFO] [stdout] 189 | if !cap.name("lang").is_some() || !cap.name("variant").is_some() || !wof_names.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap.name("lang").is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:189:43 [INFO] [stdout] | [INFO] [stdout] 189 | if !cap.name("lang").is_some() || !cap.name("variant").is_some() || !wof_names.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap.name("variant").is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:189:77 [INFO] [stdout] | [INFO] [stdout] 189 | if !cap.name("lang").is_some() || !cap.name("variant").is_some() || !wof_names.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `wof_names.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:219:14 [INFO] [stdout] | [INFO] [stdout] 219 | if !hierarchy.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `hierarchy.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:224:18 [INFO] [stdout] | [INFO] [stdout] 224 | if !cap.name("placetype").is_some() || !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap.name("placetype").is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:224:54 [INFO] [stdout] | [INFO] [stdout] 224 | if !cap.name("placetype").is_some() || !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `id.as_i32().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wof.rs:215:5 [INFO] [stdout] | [INFO] [stdout] 215 | / if let Some(wof_hierarchy) = self.properties.get("wof:hierarchy") { [INFO] [stdout] 216 | | if let Some(hierarchies) = wof_hierarchy.as_array() { [INFO] [stdout] 217 | | for hierarchy in hierarchies { [INFO] [stdout] 218 | | let hierarchy = hierarchy.as_object(); [INFO] [stdout] ... | [INFO] [stdout] 235 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 215 ~ if let Some(wof_hierarchy) = self.properties.get("wof:hierarchy") [INFO] [stdout] 216 ~ && let Some(hierarchies) = wof_hierarchy.as_array() { [INFO] [stdout] 217 | for hierarchy in hierarchies { [INFO] [stdout] ... [INFO] [stdout] 233 | } [INFO] [stdout] 234 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:244:14 [INFO] [stdout] | [INFO] [stdout] 244 | if !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `id.as_i32().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wof.rs:241:5 [INFO] [stdout] | [INFO] [stdout] 241 | / if let Some(wof_concordances) = self.properties.get("wof:concordances") { [INFO] [stdout] 242 | | if let Some(wof_concordances) = wof_concordances.as_object() { [INFO] [stdout] 243 | | for (source, id) in wof_concordances.iter() { [INFO] [stdout] 244 | | if !id.as_i32().is_some() { [INFO] [stdout] ... | [INFO] [stdout] 250 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 241 ~ if let Some(wof_concordances) = self.properties.get("wof:concordances") [INFO] [stdout] 242 ~ && let Some(wof_concordances) = wof_concordances.as_object() { [INFO] [stdout] 243 | for (source, id) in wof_concordances.iter() { [INFO] [stdout] ... [INFO] [stdout] 248 | } [INFO] [stdout] 249 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wof.rs:309:14 [INFO] [stdout] | [INFO] [stdout] 309 | if !id.as_i32().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `id.as_i32().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/wof.rs:306:5 [INFO] [stdout] | [INFO] [stdout] 306 | / if let Some(wof_belongs_to) = self.properties.get("wof:belongsto") { [INFO] [stdout] 307 | | if let Some(wof_belongs_to) = wof_belongs_to.as_array() { [INFO] [stdout] 308 | | for id in wof_belongs_to.iter() { [INFO] [stdout] 309 | | if !id.as_i32().is_some() { [INFO] [stdout] ... | [INFO] [stdout] 315 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 306 ~ if let Some(wof_belongs_to) = self.properties.get("wof:belongsto") [INFO] [stdout] 307 ~ && let Some(wof_belongs_to) = wof_belongs_to.as_array() { [INFO] [stdout] 308 | for id in wof_belongs_to.iter() { [INFO] [stdout] ... [INFO] [stdout] 313 | } [INFO] [stdout] 314 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/mod.rs:54:17 [INFO] [stdout] | [INFO] [stdout] 54 | for elem in vec![-1.90, 1.90, 0.0, 0.90, 1234.5678] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[-1.90, 1.90, 0.0, 0.90, 1234.5678]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/mod.rs:64:17 [INFO] [stdout] | [INFO] [stdout] 64 | for elem in vec![1, 2, -1, -100] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, -1, -100]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/mod.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | for elem in vec![true, false] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[true, false]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/mod.rs:84:17 [INFO] [stdout] | [INFO] [stdout] 84 | for elem in vec!["null", "Null", "NULL"] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["null", "Null", "NULL"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/mod.rs:94:17 [INFO] [stdout] | [INFO] [stdout] 94 | for elem in vec!["wof:placetype", "geom_type"] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["wof:placetype", "geom_type"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/tokenizer.rs:97:5 [INFO] [stdout] | [INFO] [stdout] 97 | vec!["=", "=="].iter().for_each(|eq| { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: you can use an array directly: `["=", "=="]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/tokenizer.rs:107:5 [INFO] [stdout] | [INFO] [stdout] 107 | vec!["!=", "<>"].iter().for_each(|neq| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: you can use an array directly: `["!=", "<>"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/tokenizer.rs:117:5 [INFO] [stdout] | [INFO] [stdout] 117 | vec!["and", "&&"].iter().for_each(|neq| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["and", "&&"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/tokenizer.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | vec!["or", "||"].iter().for_each(|neq| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: you can use an array directly: `["or", "||"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/tokenizer.rs:194:17 [INFO] [stdout] | [INFO] [stdout] 194 | for elem in vec![-1.90, 1.90, 0.0, 0.90, 1234.5678] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[-1.90, 1.90, 0.0, 0.90, 1234.5678]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/expression/tokenizer.rs:205:17 [INFO] [stdout] | [INFO] [stdout] 205 | for elem in vec![1, 2, -1, -100] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, -1, -100]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/utils/compute.rs:416:21 [INFO] [stdout] | [INFO] [stdout] 416 | let a = vec![next_pts[0] - cur_pts[0], next_pts[1] - cur_pts[1]]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[next_pts[0] - cur_pts[0], next_pts[1] - cur_pts[1]]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/utils/compute.rs:417:21 [INFO] [stdout] | [INFO] [stdout] 417 | let b = vec![checking[0] - cur_pts[0], checking[1] - cur_pts[1]]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[checking[0] - cur_pts[0], checking[1] - cur_pts[1]]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/wof.rs:259:15 [INFO] [stdout] | [INFO] [stdout] 259 | let lat = vec!["wof:latitude", "geom:latitude"] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["wof:latitude", "geom:latitude"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/wof.rs:270:15 [INFO] [stdout] | [INFO] [stdout] 270 | let lon = vec!["wof:longitude", "geom:longitude"] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["wof:longitude", "geom:longitude"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/wof.rs:180:20 [INFO] [stdout] | [INFO] [stdout] 180 | pub fn get_names(&self) -> Vec { [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] 180 | pub fn get_names(&self) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6m 17s [INFO] running `Command { std: "docker" "inspect" "37bd816fd3cc35c3b535e32ed82541da9ec73712ce3756da7ee5293a8235ae28", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "37bd816fd3cc35c3b535e32ed82541da9ec73712ce3756da7ee5293a8235ae28", kill_on_drop: false }` [INFO] [stdout] 37bd816fd3cc35c3b535e32ed82541da9ec73712ce3756da7ee5293a8235ae28