[INFO] fetching crate cargo-make 0.37.24... [INFO] linting cargo-make-0.37.24 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate cargo-make 0.37.24 into /workspace/builds/worker-7-tc1/source [INFO] started tweaking crates.io crate cargo-make 0.37.24 [INFO] finished tweaking crates.io crate cargo-make 0.37.24 [INFO] tweaked toml for crates.io crate cargo-make 0.37.24 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate cargo-make 0.37.24 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 cargo-make 0.37.24 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded serde_ignored v0.1.10 [INFO] [stderr] Downloaded lenient_semver_parser v0.4.2 [INFO] [stderr] Downloaded java-properties v2.0.0 [INFO] [stderr] Downloaded cargo_metadata v0.19.1 [INFO] [stderr] Downloaded native-tls v0.2.12 [INFO] [stderr] Downloaded uname v0.1.1 [INFO] [stderr] Downloaded camino v1.1.9 [INFO] [stderr] Downloaded dissimilar v1.0.9 [INFO] [stderr] Downloaded rustls-pki-types v1.10.1 [INFO] [stderr] Downloaded vte v0.14.1 [INFO] [stderr] Downloaded attohttpc v0.28.2 [INFO] [stderr] Downloaded duckscriptsdk v0.11.1 [INFO] [stderr] Downloaded zip v2.2.2 [INFO] [stderr] Downloaded evalexpr v11.3.1 [INFO] [stderr] Downloaded serde_json v1.0.135 [INFO] [stderr] Downloaded suppaftp v6.0.7 [INFO] [stderr] Downloaded expect-test v1.5.1 [INFO] [stderr] Downloaded lenient_semver_version_builder v0.4.2 [INFO] [stderr] Downloaded duckscript v0.10.0 [INFO] [stderr] Downloaded openssl v0.10.68 [INFO] [stderr] Downloaded webpki-roots v0.26.7 [INFO] [stderr] Downloaded fern v0.7.1 [INFO] [stderr] Downloaded lenient_semver v0.4.2 [INFO] [stderr] Downloaded rustls v0.23.21 [INFO] [stderr] Downloaded which v6.0.3 [INFO] [stderr] Downloaded rustix v0.38.43 [INFO] [stderr] Downloaded globset v0.4.15 [INFO] [stderr] Downloaded strip-ansi-escapes v0.2.1 [INFO] [stderr] Downloaded run_script v0.11.0 [INFO] [stderr] Downloaded git_info v0.1.3 [INFO] [stderr] Downloaded shell2batch v0.4.5 [INFO] [stderr] Downloaded ci_info v0.14.14 [INFO] [stderr] Downloaded fsio v0.4.0 [INFO] [stderr] Downloaded cliparser v0.1.2 [INFO] [stderr] Downloaded rust_info v0.3.3 [INFO] [stderr] Downloaded envmnt v0.10.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 429c26e02a2b5241aea0f39aaad6b75857bda6e5ef8d0f3ef24946a0fd67fa92 [INFO] running `Command { std: "docker" "start" "-a" "429c26e02a2b5241aea0f39aaad6b75857bda6e5ef8d0f3ef24946a0fd67fa92", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "429c26e02a2b5241aea0f39aaad6b75857bda6e5ef8d0f3ef24946a0fd67fa92", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "429c26e02a2b5241aea0f39aaad6b75857bda6e5ef8d0f3ef24946a0fd67fa92", kill_on_drop: false }` [INFO] [stdout] 429c26e02a2b5241aea0f39aaad6b75857bda6e5ef8d0f3ef24946a0fd67fa92 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] fb73b2de19d94b0337b63d60ecc74226866a1254a4d95a05cd8075b69a8b83d6 [INFO] running `Command { std: "docker" "start" "-a" "fb73b2de19d94b0337b63d60ecc74226866a1254a4d95a05cd8075b69a8b83d6", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.96 [INFO] [stderr] Compiling libc v0.2.169 [INFO] [stderr] Compiling serde v1.0.217 [INFO] [stderr] Checking litemap v0.7.4 [INFO] [stderr] Compiling cc v1.2.10 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling memchr v2.7.4 [INFO] [stderr] Compiling semver v1.0.24 [INFO] [stderr] Compiling pkg-config v0.3.31 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Checking hashbrown v0.15.2 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking itoa v1.0.14 [INFO] [stderr] Checking rustls-pki-types v1.10.1 [INFO] [stderr] Checking bitflags v2.8.0 [INFO] [stderr] Checking miniz_oxide v0.8.3 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Compiling rustls v0.23.21 [INFO] [stderr] Compiling serde_json v1.0.135 [INFO] [stderr] Checking percent-encoding v2.3.1 [INFO] [stderr] Compiling rustix v0.38.43 [INFO] [stderr] Compiling nix v0.29.0 [INFO] [stderr] Checking form_urlencoded v1.2.1 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Checking bstr v1.11.3 [INFO] [stderr] Checking iana-time-zone v0.1.61 [INFO] [stderr] Compiling zip v2.2.2 [INFO] [stderr] Compiling rustversion v1.0.19 [INFO] [stderr] Checking bytes v1.9.0 [INFO] [stderr] Checking lockfree-object-pool v0.1.6 [INFO] [stderr] Checking flate2 v1.0.35 [INFO] [stderr] Checking simd-adler32 v0.3.7 [INFO] [stderr] Compiling camino v1.1.9 [INFO] [stderr] Checking futures-core v0.3.31 [INFO] [stderr] Checking linux-raw-sys v0.4.15 [INFO] [stderr] Checking zopfli v0.8.1 [INFO] [stderr] Checking crossbeam-deque v0.8.6 [INFO] [stderr] Checking futures-lite v2.6.0 [INFO] [stderr] Checking http v1.2.0 [INFO] [stderr] Checking time v0.3.37 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking webpki-roots v0.26.7 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Checking winnow v0.6.24 [INFO] [stderr] Checking cpufeatures v0.2.16 [INFO] [stderr] Checking home v0.5.11 [INFO] [stderr] Checking sha2 v0.10.8 [INFO] [stderr] Checking colored v2.2.0 [INFO] [stderr] Checking vte v0.14.1 [INFO] [stderr] Checking fs_extra v1.3.0 [INFO] [stderr] Checking chrono v0.4.39 [INFO] [stderr] Checking whoami v1.5.2 [INFO] [stderr] Checking fixedbitset v0.5.7 [INFO] [stderr] Checking evalexpr v11.3.1 [INFO] [stderr] Checking glob v0.3.2 [INFO] [stderr] Checking heck v0.5.0 [INFO] [stderr] Compiling ring v0.17.8 [INFO] [stderr] Compiling bzip2-sys v0.1.11+1.0.8 [INFO] [stderr] Checking strip-ansi-escapes v0.2.1 [INFO] [stderr] Checking fern v0.7.1 [INFO] [stderr] Checking git_info v0.1.3 [INFO] [stderr] Checking rust_info v0.3.3 [INFO] [stderr] Checking colored v3.0.0 [INFO] [stderr] Checking cliparser v0.1.2 [INFO] [stderr] Checking dissimilar v1.0.9 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking dirs-sys-next v0.1.2 [INFO] [stderr] Checking uname v0.1.1 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking expect-test v1.5.1 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking dirs-next v2.0.0 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking globset v0.4.15 [INFO] [stderr] Checking shell2batch v0.4.5 [INFO] [stderr] Checking which v6.0.3 [INFO] [stderr] Checking bzip2 v0.4.4 [INFO] [stderr] Checking ctrlc v3.4.5 [INFO] [stderr] Checking ignore v0.4.23 [INFO] [stderr] Checking java-properties v2.0.0 [INFO] [stderr] Compiling synstructure v0.13.1 [INFO] [stderr] Checking rustls-webpki v0.102.8 [INFO] [stderr] Compiling serde_derive v1.0.217 [INFO] [stderr] Compiling zerofrom-derive v0.1.5 [INFO] [stderr] Compiling yoke-derive v0.7.5 [INFO] [stderr] Compiling zerovec-derive v0.10.3 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling thiserror-impl v2.0.11 [INFO] [stderr] Compiling lazy-regex-proc_macros v3.4.1 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking lazy-regex v3.4.1 [INFO] [stderr] Checking zerofrom v0.1.5 [INFO] [stderr] Checking yoke v0.7.5 [INFO] [stderr] Checking thiserror v2.0.11 [INFO] [stderr] Checking suppaftp v6.0.7 [INFO] [stderr] Checking zerovec v0.10.4 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking tinystr v0.7.6 [INFO] [stderr] Checking icu_collections v1.5.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking icu_locid v1.5.0 [INFO] [stderr] Checking fsio v0.4.0 [INFO] [stderr] Checking icu_provider v1.5.0 [INFO] [stderr] Checking duckscript v0.10.0 [INFO] [stderr] Checking envmnt v0.10.4 [INFO] [stderr] Checking run_script v0.11.0 [INFO] [stderr] Checking ci_info v0.14.14 [INFO] [stderr] Checking icu_locid_transform v1.5.0 [INFO] [stderr] Checking icu_properties v1.5.1 [INFO] [stderr] Checking icu_normalizer v1.5.0 [INFO] [stderr] Checking indexmap v2.7.0 [INFO] [stderr] Checking toml_datetime v0.6.8 [INFO] [stderr] Checking serde_spanned v0.6.8 [INFO] [stderr] Checking cargo-platform v0.1.9 [INFO] [stderr] Checking serde_ignored v0.1.10 [INFO] [stderr] Checking idna_adapter v1.2.0 [INFO] [stderr] Checking lenient_semver_version_builder v0.4.2 [INFO] [stderr] Checking lenient_semver_parser v0.4.2 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking lenient_semver v0.4.2 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking cargo_metadata v0.19.1 [INFO] [stderr] Checking toml_edit v0.22.22 [INFO] [stderr] Checking petgraph v0.7.1 [INFO] [stderr] Checking attohttpc v0.28.2 [INFO] [stderr] Checking duckscriptsdk v0.11.1 [INFO] [stderr] Checking toml v0.8.19 [INFO] [stderr] Checking cargo-make v0.37.24 (/opt/rustwide/workdir) [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/lib/cache.rs:15:21 [INFO] [stdout] | [INFO] [stdout] 15 | static CACHE_FILE: &'static str = "cache.toml"; [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: unneeded unit expression [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/lib/config.rs:17:26 [INFO] [stdout] | [INFO] [stdout] 17 | pub static CONFIG_FILE: &'static str = "config.toml"; [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: unneeded unit expression [INFO] [stdout] --> src/lib/environment/crateinfo.rs:234:33 [INFO] [stdout] | [INFO] [stdout] 234 | ... () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/lib/installer/mod.rs:176:17 [INFO] [stdout] | [INFO] [stdout] 176 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/lib/runner.rs:390:25 [INFO] [stdout] | [INFO] [stdout] 390 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/lib/runner.rs:395:25 [INFO] [stdout] | [INFO] [stdout] 395 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/lib/scriptengine/shebang_script.rs:17:27 [INFO] [stdout] | [INFO] [stdout] 17 | const DEFAULT_EXTENSION: &'static str = "sh"; [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: unneeded unit expression [INFO] [stdout] --> src/lib/types_test.rs:1550:17 [INFO] [stdout] | [INFO] [stdout] 1550 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/lib/types_test.rs:1574:17 [INFO] [stdout] | [INFO] [stdout] 1574 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/lib/types_test.rs:1598:17 [INFO] [stdout] | [INFO] [stdout] 1598 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/lib/types_test.rs:1622:17 [INFO] [stdout] | [INFO] [stdout] 1622 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/lib/types_test.rs:1645:17 [INFO] [stdout] | [INFO] [stdout] 1645 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/lib/cache.rs:15:21 [INFO] [stdout] | [INFO] [stdout] 15 | static CACHE_FILE: &'static str = "cache.toml"; [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: unneeded unit expression [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/lib/completion.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | / /// 5. **Testing**: Implement unit tests to verify the correct behavior of completion generation functions. [INFO] [stdout] 22 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 25 | mod completion_test; [INFO] [stdout] | ------------------- the comment documents this module [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/lib/config.rs:17:26 [INFO] [stdout] | [INFO] [stdout] 17 | pub static CONFIG_FILE: &'static str = "config.toml"; [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: unneeded unit expression [INFO] [stdout] --> src/lib/environment/crateinfo.rs:234:33 [INFO] [stdout] | [INFO] [stdout] 234 | ... () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/lib/installer/mod.rs:176:17 [INFO] [stdout] | [INFO] [stdout] 176 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/lib/runner.rs:390:25 [INFO] [stdout] | [INFO] [stdout] 390 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/lib/runner.rs:395:25 [INFO] [stdout] | [INFO] [stdout] 395 | () [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/lib/scriptengine/shebang_script.rs:17:27 [INFO] [stdout] | [INFO] [stdout] 17 | const DEFAULT_EXTENSION: &'static str = "sh"; [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: length comparison to zero [INFO] [stdout] --> src/lib/types.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | if namespace.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!namespace.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: you should consider adding a `Default` implementation for `CliArgs` [INFO] [stdout] --> src/lib/types.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 138 | / pub fn new() -> CliArgs { [INFO] [stdout] 139 | | CliArgs { [INFO] [stdout] 140 | | command: "".to_string(), [INFO] [stdout] 141 | | build_file: None, [INFO] [stdout] ... | [INFO] [stdout] 167 | | } [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] 136 + impl Default for CliArgs { [INFO] [stdout] 137 + fn default() -> Self { [INFO] [stdout] 138 + Self::new() [INFO] [stdout] 139 + } [INFO] [stdout] 140 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:630:21 [INFO] [stdout] | [INFO] [stdout] 630 | None => match other.crate_name { [INFO] [stdout] | _____________________^ [INFO] [stdout] 631 | | None => true, [INFO] [stdout] 632 | | _ => false, [INFO] [stdout] 633 | | }, [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] 630 - None => match other.crate_name { [INFO] [stdout] 631 - None => true, [INFO] [stdout] 632 - _ => false, [INFO] [stdout] 633 - }, [INFO] [stdout] 630 + None => matches!(other.crate_name, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:630:21 [INFO] [stdout] | [INFO] [stdout] 630 | None => match other.crate_name { [INFO] [stdout] | _____________________^ [INFO] [stdout] 631 | | None => true, [INFO] [stdout] 632 | | _ => false, [INFO] [stdout] 633 | | }, [INFO] [stdout] | |_____________^ help: try: `other.crate_name.is_none()` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:644:21 [INFO] [stdout] | [INFO] [stdout] 644 | None => match other.min_version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 645 | | None => true, [INFO] [stdout] 646 | | _ => false, [INFO] [stdout] 647 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 644 - None => match other.min_version { [INFO] [stdout] 645 - None => true, [INFO] [stdout] 646 - _ => false, [INFO] [stdout] 647 - }, [INFO] [stdout] 644 + None => matches!(other.min_version, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:644:21 [INFO] [stdout] | [INFO] [stdout] 644 | None => match other.min_version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 645 | | None => true, [INFO] [stdout] 646 | | _ => false, [INFO] [stdout] 647 | | }, [INFO] [stdout] | |_____________^ help: try: `other.min_version.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:658:21 [INFO] [stdout] | [INFO] [stdout] 658 | None => match other.install_command { [INFO] [stdout] | _____________________^ [INFO] [stdout] 659 | | None => true, [INFO] [stdout] 660 | | _ => false, [INFO] [stdout] 661 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 658 - None => match other.install_command { [INFO] [stdout] 659 - None => true, [INFO] [stdout] 660 - _ => false, [INFO] [stdout] 661 - }, [INFO] [stdout] 658 + None => matches!(other.install_command, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:658:21 [INFO] [stdout] | [INFO] [stdout] 658 | None => match other.install_command { [INFO] [stdout] | _____________________^ [INFO] [stdout] 659 | | None => true, [INFO] [stdout] 660 | | _ => false, [INFO] [stdout] 661 | | }, [INFO] [stdout] | |_____________^ help: try: `other.install_command.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:672:21 [INFO] [stdout] | [INFO] [stdout] 672 | None => match other.force { [INFO] [stdout] | _____________________^ [INFO] [stdout] 673 | | None => true, [INFO] [stdout] 674 | | _ => false, [INFO] [stdout] 675 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 672 - None => match other.force { [INFO] [stdout] 673 - None => true, [INFO] [stdout] 674 - _ => false, [INFO] [stdout] 675 - }, [INFO] [stdout] 672 + None => matches!(other.force, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:672:21 [INFO] [stdout] | [INFO] [stdout] 672 | None => match other.force { [INFO] [stdout] | _____________________^ [INFO] [stdout] 673 | | None => true, [INFO] [stdout] 674 | | _ => false, [INFO] [stdout] 675 | | }, [INFO] [stdout] | |_____________^ help: try: `other.force.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib/types.rs:713:21 [INFO] [stdout] | [INFO] [stdout] 713 | / if rustup_component_name == other_rustup_component_name { [INFO] [stdout] 714 | | true [INFO] [stdout] 715 | | } else { [INFO] [stdout] 716 | | false [INFO] [stdout] 717 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 712 ~ Some(ref other_rustup_component_name) [INFO] [stdout] 713 ~ if rustup_component_name == other_rustup_component_name => { [INFO] [stdout] 714 | true [INFO] [stdout] 715 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lib/types.rs:713:21 [INFO] [stdout] | [INFO] [stdout] 713 | / if rustup_component_name == other_rustup_component_name { [INFO] [stdout] 714 | | true [INFO] [stdout] 715 | | } else { [INFO] [stdout] 716 | | false [INFO] [stdout] 717 | | } [INFO] [stdout] | |_____________________^ help: you can reduce it to: `rustup_component_name == other_rustup_component_name` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:721:21 [INFO] [stdout] | [INFO] [stdout] 721 | None => match other.rustup_component_name { [INFO] [stdout] | _____________________^ [INFO] [stdout] 722 | | None => true, [INFO] [stdout] 723 | | _ => false, [INFO] [stdout] 724 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 721 - None => match other.rustup_component_name { [INFO] [stdout] 722 - None => true, [INFO] [stdout] 723 - _ => false, [INFO] [stdout] 724 - }, [INFO] [stdout] 721 + None => matches!(other.rustup_component_name, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:721:21 [INFO] [stdout] | [INFO] [stdout] 721 | None => match other.rustup_component_name { [INFO] [stdout] | _____________________^ [INFO] [stdout] 722 | | None => true, [INFO] [stdout] 723 | | _ => false, [INFO] [stdout] 724 | | }, [INFO] [stdout] | |_____________^ help: try: `other.rustup_component_name.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:735:21 [INFO] [stdout] | [INFO] [stdout] 735 | None => match other.min_version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 736 | | None => true, [INFO] [stdout] 737 | | _ => false, [INFO] [stdout] 738 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 735 - None => match other.min_version { [INFO] [stdout] 736 - None => true, [INFO] [stdout] 737 - _ => false, [INFO] [stdout] 738 - }, [INFO] [stdout] 735 + None => matches!(other.min_version, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:735:21 [INFO] [stdout] | [INFO] [stdout] 735 | None => match other.min_version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 736 | | None => true, [INFO] [stdout] 737 | | _ => false, [INFO] [stdout] 738 | | }, [INFO] [stdout] | |_____________^ help: try: `other.min_version.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:749:21 [INFO] [stdout] | [INFO] [stdout] 749 | None => match other.version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 750 | | None => true, [INFO] [stdout] 751 | | _ => false, [INFO] [stdout] 752 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 749 - None => match other.version { [INFO] [stdout] 750 - None => true, [INFO] [stdout] 751 - _ => false, [INFO] [stdout] 752 - }, [INFO] [stdout] 749 + None => matches!(other.version, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:749:21 [INFO] [stdout] | [INFO] [stdout] 749 | None => match other.version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 750 | | None => true, [INFO] [stdout] 751 | | _ => false, [INFO] [stdout] 752 | | }, [INFO] [stdout] | |_____________^ help: try: `other.version.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:763:21 [INFO] [stdout] | [INFO] [stdout] 763 | None => match other.install_command { [INFO] [stdout] | _____________________^ [INFO] [stdout] 764 | | None => true, [INFO] [stdout] 765 | | _ => false, [INFO] [stdout] 766 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 763 - None => match other.install_command { [INFO] [stdout] 764 - None => true, [INFO] [stdout] 765 - _ => false, [INFO] [stdout] 766 - }, [INFO] [stdout] 763 + None => matches!(other.install_command, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:763:21 [INFO] [stdout] | [INFO] [stdout] 763 | None => match other.install_command { [INFO] [stdout] | _____________________^ [INFO] [stdout] 764 | | None => true, [INFO] [stdout] 765 | | _ => false, [INFO] [stdout] 766 | | }, [INFO] [stdout] | |_____________^ help: try: `other.install_command.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:777:21 [INFO] [stdout] | [INFO] [stdout] 777 | None => match other.force { [INFO] [stdout] | _____________________^ [INFO] [stdout] 778 | | None => true, [INFO] [stdout] 779 | | _ => false, [INFO] [stdout] 780 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 777 - None => match other.force { [INFO] [stdout] 778 - None => true, [INFO] [stdout] 779 - _ => false, [INFO] [stdout] 780 - }, [INFO] [stdout] 777 + None => matches!(other.force, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:777:21 [INFO] [stdout] | [INFO] [stdout] 777 | None => match other.force { [INFO] [stdout] | _____________________^ [INFO] [stdout] 778 | | None => true, [INFO] [stdout] 779 | | _ => false, [INFO] [stdout] 780 | | }, [INFO] [stdout] | |_____________^ help: try: `other.force.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:806:25 [INFO] [stdout] | [INFO] [stdout] 806 | None => match other.binary { [INFO] [stdout] | _________________________^ [INFO] [stdout] 807 | | None => true, [INFO] [stdout] 808 | | _ => false, [INFO] [stdout] 809 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 806 - None => match other.binary { [INFO] [stdout] 807 - None => true, [INFO] [stdout] 808 - _ => false, [INFO] [stdout] 809 - }, [INFO] [stdout] 806 + None => matches!(other.binary, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:806:25 [INFO] [stdout] | [INFO] [stdout] 806 | None => match other.binary { [INFO] [stdout] | _________________________^ [INFO] [stdout] 807 | | None => true, [INFO] [stdout] 808 | | _ => false, [INFO] [stdout] 809 | | }, [INFO] [stdout] | |_________________^ help: try: `other.binary.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:952:21 [INFO] [stdout] | [INFO] [stdout] 952 | None => match other.version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 953 | | None => true, [INFO] [stdout] 954 | | _ => false, [INFO] [stdout] 955 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 952 - None => match other.version { [INFO] [stdout] 953 - None => true, [INFO] [stdout] 954 - _ => false, [INFO] [stdout] 955 - }, [INFO] [stdout] 952 + None => matches!(other.version, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:952:21 [INFO] [stdout] | [INFO] [stdout] 952 | None => match other.version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 953 | | None => true, [INFO] [stdout] 954 | | _ => false, [INFO] [stdout] 955 | | }, [INFO] [stdout] | |_____________^ help: try: `other.version.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:964:25 [INFO] [stdout] | [INFO] [stdout] 964 | None => match other.postpone { [INFO] [stdout] | _________________________^ [INFO] [stdout] 965 | | None => true, [INFO] [stdout] 966 | | _ => false, [INFO] [stdout] 967 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 964 - None => match other.postpone { [INFO] [stdout] 965 - None => true, [INFO] [stdout] 966 - _ => false, [INFO] [stdout] 967 - }, [INFO] [stdout] 964 + None => matches!(other.postpone, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:964:25 [INFO] [stdout] | [INFO] [stdout] 964 | None => match other.postpone { [INFO] [stdout] | _________________________^ [INFO] [stdout] 965 | | None => true, [INFO] [stdout] 966 | | _ => false, [INFO] [stdout] 967 | | }, [INFO] [stdout] | |_________________^ help: try: `other.postpone.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:979:25 [INFO] [stdout] | [INFO] [stdout] 979 | None => match other.ignore_pattern { [INFO] [stdout] | _________________________^ [INFO] [stdout] 980 | | None => true, [INFO] [stdout] 981 | | _ => false, [INFO] [stdout] 982 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 979 - None => match other.ignore_pattern { [INFO] [stdout] 980 - None => true, [INFO] [stdout] 981 - _ => false, [INFO] [stdout] 982 - }, [INFO] [stdout] 979 + None => matches!(other.ignore_pattern, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:979:25 [INFO] [stdout] | [INFO] [stdout] 979 | None => match other.ignore_pattern { [INFO] [stdout] | _________________________^ [INFO] [stdout] 980 | | None => true, [INFO] [stdout] 981 | | _ => false, [INFO] [stdout] 982 | | }, [INFO] [stdout] | |_________________^ help: try: `other.ignore_pattern.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:994:25 [INFO] [stdout] | [INFO] [stdout] 994 | None => match other.no_git_ignore { [INFO] [stdout] | _________________________^ [INFO] [stdout] 995 | | None => true, [INFO] [stdout] 996 | | _ => false, [INFO] [stdout] 997 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 994 - None => match other.no_git_ignore { [INFO] [stdout] 995 - None => true, [INFO] [stdout] 996 - _ => false, [INFO] [stdout] 997 - }, [INFO] [stdout] 994 + None => matches!(other.no_git_ignore, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:994:25 [INFO] [stdout] | [INFO] [stdout] 994 | None => match other.no_git_ignore { [INFO] [stdout] | _________________________^ [INFO] [stdout] 995 | | None => true, [INFO] [stdout] 996 | | _ => false, [INFO] [stdout] 997 | | }, [INFO] [stdout] | |_________________^ help: try: `other.no_git_ignore.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:1009:25 [INFO] [stdout] | [INFO] [stdout] 1009 | None => match other.watch { [INFO] [stdout] | _________________________^ [INFO] [stdout] 1010 | | None => true, [INFO] [stdout] 1011 | | _ => false, [INFO] [stdout] 1012 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 1009 - None => match other.watch { [INFO] [stdout] 1010 - None => true, [INFO] [stdout] 1011 - _ => false, [INFO] [stdout] 1012 - }, [INFO] [stdout] 1009 + None => matches!(other.watch, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:1009:25 [INFO] [stdout] | [INFO] [stdout] 1009 | None => match other.watch { [INFO] [stdout] | _________________________^ [INFO] [stdout] 1010 | | None => true, [INFO] [stdout] 1011 | | _ => false, [INFO] [stdout] 1012 | | }, [INFO] [stdout] | |_________________^ help: try: `other.watch.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/types.rs:1229:42 [INFO] [stdout] | [INFO] [stdout] 1229 | Self::Simple(ref channel) => &channel, [INFO] [stdout] | ^^^^^^^^ help: change this to: `channel` [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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/lib/types.rs:1327:1 [INFO] [stdout] | [INFO] [stdout] 1327 | impl Into for DependencyIdentifier { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1327 ~ impl From for TaskIdentifier { [INFO] [stdout] 1328 ~ fn from(val: DependencyIdentifier) -> Self { [INFO] [stdout] 1329 ~ match val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib/types.rs:1346:17 [INFO] [stdout] | [INFO] [stdout] 1346 | / if value { [INFO] [stdout] 1347 | | self.private = Some(true); [INFO] [stdout] 1348 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1345 ~ Some(value) [INFO] [stdout] 1346 ~ if value => { [INFO] [stdout] 1347 | self.private = Some(true); [INFO] [stdout] 1348 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/types.rs:1344:9 [INFO] [stdout] | [INFO] [stdout] 1344 | / match modify_config.private { [INFO] [stdout] 1345 | | Some(value) => { [INFO] [stdout] 1346 | | if value { [INFO] [stdout] 1347 | | self.private = Some(true); [INFO] [stdout] ... | [INFO] [stdout] 1350 | | None => (), [INFO] [stdout] 1351 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1344 ~ if let Some(value) = modify_config.private { [INFO] [stdout] 1345 + if value { [INFO] [stdout] 1346 + self.private = Some(true); [INFO] [stdout] 1347 + } [INFO] [stdout] 1348 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib/types.rs:1355:17 [INFO] [stdout] | [INFO] [stdout] 1355 | / if namespace.len() > 0 { [INFO] [stdout] 1356 | | if self.extend.is_some() { [INFO] [stdout] 1357 | | self.extend = Some(get_namespaced_task_name( [INFO] [stdout] 1358 | | namespace, [INFO] [stdout] ... | [INFO] [stdout] 1456 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1354 ~ Some(ref namespace) [INFO] [stdout] 1355 ~ if namespace.len() > 0 => { [INFO] [stdout] 1356 | if self.extend.is_some() { [INFO] [stdout] ... [INFO] [stdout] 1455 | } [INFO] [stdout] 1456 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/types.rs:1353:9 [INFO] [stdout] | [INFO] [stdout] 1353 | / match modify_config.namespace { [INFO] [stdout] 1354 | | Some(ref namespace) => { [INFO] [stdout] 1355 | | if namespace.len() > 0 { [INFO] [stdout] 1356 | | if self.extend.is_some() { [INFO] [stdout] ... | [INFO] [stdout] 1458 | | None => (), [INFO] [stdout] 1459 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1353 ~ if let Some(ref namespace) = modify_config.namespace { [INFO] [stdout] 1354 + if namespace.len() > 0 { [INFO] [stdout] 1355 + if self.extend.is_some() { [INFO] [stdout] 1356 + self.extend = Some(get_namespaced_task_name( [INFO] [stdout] 1357 + namespace, [INFO] [stdout] 1358 + &self.extend.clone().unwrap(), [INFO] [stdout] 1359 + )); [INFO] [stdout] 1360 + } [INFO] [stdout] 1361 + [INFO] [stdout] 1362 + if self.alias.is_some() { [INFO] [stdout] 1363 + self.alias = Some(get_namespaced_task_name( [INFO] [stdout] 1364 + namespace, [INFO] [stdout] 1365 + &self.alias.clone().unwrap(), [INFO] [stdout] 1366 + )); [INFO] [stdout] 1367 + } [INFO] [stdout] 1368 + [INFO] [stdout] 1369 + if self.linux_alias.is_some() { [INFO] [stdout] 1370 + self.linux_alias = Some(get_namespaced_task_name( [INFO] [stdout] 1371 + namespace, [INFO] [stdout] 1372 + &self.linux_alias.clone().unwrap(), [INFO] [stdout] 1373 + )); [INFO] [stdout] 1374 + } [INFO] [stdout] 1375 + [INFO] [stdout] 1376 + if self.windows_alias.is_some() { [INFO] [stdout] 1377 + self.windows_alias = Some(get_namespaced_task_name( [INFO] [stdout] 1378 + namespace, [INFO] [stdout] 1379 + &self.windows_alias.clone().unwrap(), [INFO] [stdout] 1380 + )); [INFO] [stdout] 1381 + } [INFO] [stdout] 1382 + [INFO] [stdout] 1383 + if self.mac_alias.is_some() { [INFO] [stdout] 1384 + self.mac_alias = Some(get_namespaced_task_name( [INFO] [stdout] 1385 + namespace, [INFO] [stdout] 1386 + &self.mac_alias.clone().unwrap(), [INFO] [stdout] 1387 + )); [INFO] [stdout] 1388 + } [INFO] [stdout] 1389 + [INFO] [stdout] 1390 + if self.run_task.is_some() { [INFO] [stdout] 1391 + let mut run_task = self.run_task.clone().unwrap(); [INFO] [stdout] 1392 + [INFO] [stdout] 1393 + run_task = match run_task { [INFO] [stdout] 1394 + RunTaskInfo::Name(value) => { [INFO] [stdout] 1395 + RunTaskInfo::Name(get_namespaced_task_name(namespace, &value)) [INFO] [stdout] 1396 + } [INFO] [stdout] 1397 + RunTaskInfo::Details(mut run_task_details) => { [INFO] [stdout] 1398 + match run_task_details.name { [INFO] [stdout] 1399 + RunTaskName::Single(ref name) => { [INFO] [stdout] 1400 + run_task_details.name = RunTaskName::Single( [INFO] [stdout] 1401 + get_namespaced_task_name(namespace, name), [INFO] [stdout] 1402 + ) [INFO] [stdout] 1403 + } [INFO] [stdout] 1404 + RunTaskName::Multiple(ref names) => { [INFO] [stdout] 1405 + let mut updated_names = vec![]; [INFO] [stdout] 1406 + for name in names { [INFO] [stdout] 1407 + updated_names [INFO] [stdout] 1408 + .push(get_namespaced_task_name(namespace, name)); [INFO] [stdout] 1409 + } [INFO] [stdout] 1410 + [INFO] [stdout] 1411 + run_task_details.name = [INFO] [stdout] 1412 + RunTaskName::Multiple(updated_names); [INFO] [stdout] 1413 + } [INFO] [stdout] 1414 + }; [INFO] [stdout] 1415 + [INFO] [stdout] 1416 + RunTaskInfo::Details(run_task_details) [INFO] [stdout] 1417 + } [INFO] [stdout] 1418 + RunTaskInfo::Routing(mut routing_info_vector) => { [INFO] [stdout] 1419 + for routing_info in &mut routing_info_vector { [INFO] [stdout] 1420 + match routing_info.name { [INFO] [stdout] 1421 + RunTaskName::Single(ref name) => { [INFO] [stdout] 1422 + routing_info.name = RunTaskName::Single( [INFO] [stdout] 1423 + get_namespaced_task_name(namespace, name), [INFO] [stdout] 1424 + ) [INFO] [stdout] 1425 + } [INFO] [stdout] 1426 + RunTaskName::Multiple(ref names) => { [INFO] [stdout] 1427 + let mut updated_names = vec![]; [INFO] [stdout] 1428 + for name in names { [INFO] [stdout] 1429 + updated_names.push(get_namespaced_task_name( [INFO] [stdout] 1430 + namespace, name, [INFO] [stdout] 1431 + )); [INFO] [stdout] 1432 + } [INFO] [stdout] 1433 + [INFO] [stdout] 1434 + routing_info.name = [INFO] [stdout] 1435 + RunTaskName::Multiple(updated_names); [INFO] [stdout] 1436 + } [INFO] [stdout] 1437 + }; [INFO] [stdout] 1438 + } [INFO] [stdout] 1439 + [INFO] [stdout] 1440 + RunTaskInfo::Routing(routing_info_vector) [INFO] [stdout] 1441 + } [INFO] [stdout] 1442 + }; [INFO] [stdout] 1443 + [INFO] [stdout] 1444 + self.run_task = Some(run_task); [INFO] [stdout] 1445 + } [INFO] [stdout] 1446 + [INFO] [stdout] 1447 + if let Some(dependencies) = &self.dependencies { [INFO] [stdout] 1448 + self.dependencies = Some( [INFO] [stdout] 1449 + dependencies [INFO] [stdout] 1450 + .iter() [INFO] [stdout] 1451 + .map(|identifier| identifier.to_owned().with_namespace(namespace)) [INFO] [stdout] 1452 + .collect(), [INFO] [stdout] 1453 + ); [INFO] [stdout] 1454 + } [INFO] [stdout] 1455 + } [INFO] [stdout] 1456 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/types.rs:1355:20 [INFO] [stdout] | [INFO] [stdout] 1355 | if namespace.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!namespace.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 can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/types.rs:1468:31 [INFO] [stdout] | [INFO] [stdout] 1468 | let override_values = match task.clear { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 1469 | | Some(value) => value, [INFO] [stdout] 1470 | | None => false, [INFO] [stdout] 1471 | | }; [INFO] [stdout] | |_________^ help: replace it with: `task.clear.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1474:26 [INFO] [stdout] | [INFO] [stdout] 1474 | self.clear = task.clear.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.clear` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1490:29 [INFO] [stdout] | [INFO] [stdout] 1490 | self.disabled = task.disabled.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.disabled` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1496:28 [INFO] [stdout] | [INFO] [stdout] 1496 | self.private = task.private.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.private` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1514:30 [INFO] [stdout] | [INFO] [stdout] 1514 | self.workspace = task.workspace.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.workspace` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1550:34 [INFO] [stdout] | [INFO] [stdout] 1550 | self.ignore_errors = task.ignore_errors.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.ignore_errors` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1556:26 [INFO] [stdout] | [INFO] [stdout] 1556 | self.force = task.force.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.force` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/types.rs:1714:13 [INFO] [stdout] | [INFO] [stdout] 1714 | / match self.windows { [INFO] [stdout] 1715 | | Some(ref value) => Some(value.clone()), [INFO] [stdout] 1716 | | _ => None, [INFO] [stdout] 1717 | | } [INFO] [stdout] | |_____________^ help: try: `self.windows.as_ref().map(|value| value.clone())` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/types.rs:1719:13 [INFO] [stdout] | [INFO] [stdout] 1719 | / match self.mac { [INFO] [stdout] 1720 | | Some(ref value) => Some(value.clone()), [INFO] [stdout] 1721 | | _ => None, [INFO] [stdout] 1722 | | } [INFO] [stdout] | |_____________^ help: try: `self.mac.as_ref().map(|value| value.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/types.rs:1724:13 [INFO] [stdout] | [INFO] [stdout] 1724 | / match self.linux { [INFO] [stdout] 1725 | | Some(ref value) => Some(value.clone()), [INFO] [stdout] 1726 | | _ => None, [INFO] [stdout] 1727 | | } [INFO] [stdout] | |_____________^ help: try: `self.linux.as_ref().map(|value| value.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1738:28 [INFO] [stdout] | [INFO] [stdout] 1738 | clear: self.clear.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.clear` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1741:31 [INFO] [stdout] | [INFO] [stdout] 1741 | disabled: override_task.disabled.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `override_task.disabled` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1742:30 [INFO] [stdout] | [INFO] [stdout] 1742 | private: override_task.private.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `override_task.private` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1745:32 [INFO] [stdout] | [INFO] [stdout] 1745 | workspace: self.workspace.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.workspace` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1753:36 [INFO] [stdout] | [INFO] [stdout] 1753 | ignore_errors: override_task.ignore_errors.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `override_task.ignore_errors` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1754:28 [INFO] [stdout] | [INFO] [stdout] 1754 | force: override_task.force.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `override_task.force` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/types.rs:1804:18 [INFO] [stdout] | [INFO] [stdout] 1804 | _ => match self.alias { [INFO] [stdout] | __________________^ [INFO] [stdout] 1805 | | Some(ref alias) => Some(alias.clone()), [INFO] [stdout] 1806 | | _ => None, [INFO] [stdout] 1807 | | }, [INFO] [stdout] | |_____________^ help: try: `self.alias.as_ref().map(|alias| alias.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lib/types.rs:1816:13 [INFO] [stdout] | [INFO] [stdout] 1816 | actions_count = actions_count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `actions_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: manual implementation of an assign operation [INFO] [stdout] --> src/lib/types.rs:1819:13 [INFO] [stdout] | [INFO] [stdout] 1819 | actions_count = actions_count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `actions_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: manual implementation of an assign operation [INFO] [stdout] --> src/lib/types.rs:1822:13 [INFO] [stdout] | [INFO] [stdout] 1822 | actions_count = actions_count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `actions_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/lib/types.rs:1845:32 [INFO] [stdout] | [INFO] [stdout] 1845 | Some(ref value) => value.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value.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: length comparison to zero [INFO] [stdout] --> src/lib/types.rs:1853:32 [INFO] [stdout] | [INFO] [stdout] 1853 | Some(ref value) => value.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value.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: length comparison to zero [INFO] [stdout] --> src/lib/types.rs:1861:32 [INFO] [stdout] | [INFO] [stdout] 1861 | Some(ref value) => value.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value.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: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lib/types.rs:1883:9 [INFO] [stdout] | [INFO] [stdout] 1883 | / if actions_count <= 1 { [INFO] [stdout] 1884 | | true [INFO] [stdout] 1885 | | } else { [INFO] [stdout] 1886 | | false [INFO] [stdout] 1887 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `actions_count <= 1` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1964:33 [INFO] [stdout] | [INFO] [stdout] 1964 | self.disabled = task.disabled.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.disabled` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1968:32 [INFO] [stdout] | [INFO] [stdout] 1968 | self.private = task.private.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.private` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2002:38 [INFO] [stdout] | [INFO] [stdout] 2002 | self.ignore_errors = task.ignore_errors.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.ignore_errors` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2006:30 [INFO] [stdout] | [INFO] [stdout] 2006 | self.force = task.force.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.force` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/types.rs:2113:36 [INFO] [stdout] | [INFO] [stdout] 2113 | Some(ref value) => value.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/types.rs:2207:9 [INFO] [stdout] | [INFO] [stdout] 2207 | / match modify_config.namespace { [INFO] [stdout] 2208 | | Some(ref namespace) => { [INFO] [stdout] 2209 | | if self.init_task.is_some() { [INFO] [stdout] 2210 | | self.init_task = Some(get_namespaced_task_name( [INFO] [stdout] ... | [INFO] [stdout] 2237 | | None => (), [INFO] [stdout] 2238 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2207 ~ if let Some(ref namespace) = modify_config.namespace { [INFO] [stdout] 2208 + if self.init_task.is_some() { [INFO] [stdout] 2209 + self.init_task = Some(get_namespaced_task_name( [INFO] [stdout] 2210 + namespace, [INFO] [stdout] 2211 + &self.init_task.clone().unwrap(), [INFO] [stdout] 2212 + )); [INFO] [stdout] 2213 + } [INFO] [stdout] 2214 + [INFO] [stdout] 2215 + if self.end_task.is_some() { [INFO] [stdout] 2216 + self.end_task = Some(get_namespaced_task_name( [INFO] [stdout] 2217 + namespace, [INFO] [stdout] 2218 + &self.end_task.clone().unwrap(), [INFO] [stdout] 2219 + )); [INFO] [stdout] 2220 + } [INFO] [stdout] 2221 + [INFO] [stdout] 2222 + if self.on_error_task.is_some() { [INFO] [stdout] 2223 + self.on_error_task = Some(get_namespaced_task_name( [INFO] [stdout] 2224 + namespace, [INFO] [stdout] 2225 + &self.on_error_task.clone().unwrap(), [INFO] [stdout] 2226 + )); [INFO] [stdout] 2227 + } [INFO] [stdout] 2228 + [INFO] [stdout] 2229 + if self.legacy_migration_task.is_some() { [INFO] [stdout] 2230 + self.legacy_migration_task = Some(get_namespaced_task_name( [INFO] [stdout] 2231 + namespace, [INFO] [stdout] 2232 + &self.legacy_migration_task.clone().unwrap(), [INFO] [stdout] 2233 + )); [INFO] [stdout] 2234 + } [INFO] [stdout] 2235 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2248:36 [INFO] [stdout] | [INFO] [stdout] 2248 | self.skip_core_tasks = extended.skip_core_tasks.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.skip_core_tasks` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2280:41 [INFO] [stdout] | [INFO] [stdout] 2280 | self.default_to_workspace = extended.default_to_workspace.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.default_to_workspace` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2284:38 [INFO] [stdout] | [INFO] [stdout] 2284 | self.skip_git_env_info = extended.skip_git_env_info.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.skip_git_env_info` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2288:39 [INFO] [stdout] | [INFO] [stdout] 2288 | self.skip_rust_env_info = extended.skip_rust_env_info.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.skip_rust_env_info` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2292:40 [INFO] [stdout] | [INFO] [stdout] 2292 | self.skip_crate_env_info = extended.skip_crate_env_info.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.skip_crate_env_info` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2296:34 [INFO] [stdout] | [INFO] [stdout] 2296 | self.reduce_output = extended.reduce_output.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.reduce_output` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2300:33 [INFO] [stdout] | [INFO] [stdout] 2300 | self.time_summary = extended.time_summary.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.time_summary` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2304:39 [INFO] [stdout] | [INFO] [stdout] 2304 | self.load_cargo_aliases = extended.load_cargo_aliases.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.load_cargo_aliases` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2308:36 [INFO] [stdout] | [INFO] [stdout] 2308 | self.disable_install = extended.disable_install.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.disable_install` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/types.rs:2396:27 [INFO] [stdout] | [INFO] [stdout] 2396 | self.config.apply(&modify_config); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `modify_config` [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/lib/types.rs:2406:71 [INFO] [stdout] | [INFO] [stdout] 2406 | let namespaced_task = get_namespaced_task_name(namespace, &key); [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/types.rs:2409:24 [INFO] [stdout] | [INFO] [stdout] 2409 | task.apply(&modify_config); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `modify_config` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/cache.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | / match get_cache_directory(false) { [INFO] [stdout] 70 | | Some(directory) => { [INFO] [stdout] 71 | | let exists = if directory.exists() { [INFO] [stdout] 72 | | true [INFO] [stdout] ... | [INFO] [stdout] 98 | | None => (), [INFO] [stdout] 99 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 69 ~ if let Some(directory) = get_cache_directory(false) { [INFO] [stdout] 70 + let exists = if directory.exists() { [INFO] [stdout] 71 + true [INFO] [stdout] 72 + } else { [INFO] [stdout] 73 + match fsio::directory::create(&directory) { [INFO] [stdout] 74 + Ok(_) => true, [INFO] [stdout] 75 + _ => false, [INFO] [stdout] 76 + } [INFO] [stdout] 77 + }; [INFO] [stdout] 78 + [INFO] [stdout] 79 + if exists { [INFO] [stdout] 80 + let file_name = directory.join(CACHE_FILE); [INFO] [stdout] 81 + [INFO] [stdout] 82 + match toml::to_string_pretty(cache_data) { [INFO] [stdout] 83 + Ok(toml_str) => match write_text_file(&file_name, &toml_str) { [INFO] [stdout] 84 + Err(error) => info!( [INFO] [stdout] 85 + "Error while writing to cache file: {:#?}, error: {:#?}", [INFO] [stdout] 86 + &file_name, error [INFO] [stdout] 87 + ), [INFO] [stdout] 88 + _ => (), [INFO] [stdout] 89 + }, [INFO] [stdout] 90 + Err(error) => info!( [INFO] [stdout] 91 + "Error during serialization of cache, file: {:#?}, error: {:#?}", [INFO] [stdout] 92 + &file_name, error [INFO] [stdout] 93 + ), [INFO] [stdout] 94 + }; [INFO] [stdout] 95 + } [INFO] [stdout] 96 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/cache.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | / match fsio::directory::create(&directory) { [INFO] [stdout] 75 | | Ok(_) => true, [INFO] [stdout] 76 | | _ => false, [INFO] [stdout] 77 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 74 - match fsio::directory::create(&directory) { [INFO] [stdout] 75 - Ok(_) => true, [INFO] [stdout] 76 - _ => false, [INFO] [stdout] 77 - } [INFO] [stdout] 74 + matches!(fsio::directory::create(&directory), Ok(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/lib/cache.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | / match fsio::directory::create(&directory) { [INFO] [stdout] 75 | | Ok(_) => true, [INFO] [stdout] 76 | | _ => false, [INFO] [stdout] 77 | | } [INFO] [stdout] | |_________________^ help: try: `fsio::directory::create(&directory).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/cache.rs:84:37 [INFO] [stdout] | [INFO] [stdout] 84 | Ok(toml_str) => match write_text_file(&file_name, &toml_str) { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 85 | | Err(error) => info!( [INFO] [stdout] 86 | | "Error while writing to cache file: {:#?}, error: {:#?}", [INFO] [stdout] 87 | | &file_name, error [INFO] [stdout] 88 | | ), [INFO] [stdout] 89 | | _ => (), [INFO] [stdout] 90 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 84 ~ Ok(toml_str) => if let Err(error) = write_text_file(&file_name, &toml_str) { info!( [INFO] [stdout] 85 + "Error while writing to cache file: {:#?}, error: {:#?}", [INFO] [stdout] 86 + &file_name, error [INFO] [stdout] 87 ~ ) }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/cli.rs:58:30 [INFO] [stdout] | [INFO] [stdout] 58 | if version::should_check(&cli_args, &global_config) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `cli_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/lib/cli.rs:58:41 [INFO] [stdout] | [INFO] [stdout] 58 | if version::should_check(&cli_args, &global_config) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `global_config` [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/lib/cli.rs:70:21 [INFO] [stdout] | [INFO] [stdout] 70 | / match environment::get_project_root() { [INFO] [stdout] 71 | | Some(value) => Some(value.clone()), [INFO] [stdout] 72 | | None => None, [INFO] [stdout] 73 | | } [INFO] [stdout] | |_____________________^ help: try: `environment::get_project_root().map(|value| value.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/cli.rs:81:15 [INFO] [stdout] | [INFO] [stdout] 81 | let cwd = match cwd_string_option { [INFO] [stdout] | _______________^ [INFO] [stdout] 82 | | Some(ref value) => Some(value.as_ref()), [INFO] [stdout] 83 | | None => None, [INFO] [stdout] 84 | | }; [INFO] [stdout] | |_____^ help: try: `cwd_string_option.as_ref().map(|value| value.as_ref())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/cli.rs:97:48 [INFO] [stdout] | [INFO] [stdout] 97 | let normalized_profile_name = profile::set(&profile_name); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `profile_name` [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/lib/cli.rs:104:35 [INFO] [stdout] | [INFO] [stdout] 104 | let config = descriptor::load(&build_file, force_makefile, env, experimental)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `build_file` [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: using `clone` on type `SystemTime` which implements the `Copy` trait [INFO] [stdout] --> src/lib/cli.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | start_time.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/cli.rs:119:43 [INFO] [stdout] | [INFO] [stdout] 119 | let env_info = environment::setup_env(&cli_args, &config, &task, home, &mut time_summary_vec)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `cli_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/lib/cli.rs:119:63 [INFO] [stdout] | [INFO] [stdout] 119 | let env_info = environment::setup_env(&cli_args, &config, &task, home, &mut time_summary_vec)?; [INFO] [stdout] | ^^^^^ help: change this to: `task` [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: length comparison to zero [INFO] [stdout] --> src/lib/cli.rs:124:8 [INFO] [stdout] | [INFO] [stdout] 124 | if crate_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!crate_name.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/cli.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | &task, [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/cli.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | &cli_args, [INFO] [stdout] | ^^^^^^^^^ help: change this to: `cli_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/lib/cli.rs:155:13 [INFO] [stdout] | [INFO] [stdout] 155 | &task, [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/cli.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 165 | &task, [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/cli.rs:167:13 [INFO] [stdout] | [INFO] [stdout] 167 | &cli_args, [INFO] [stdout] | ^^^^^^^^^ help: change this to: `cli_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/lib/cli_commands/diff_steps.rs:49:54 [INFO] [stdout] | [INFO] [stdout] 49 | ..ExecutionPlanBuilder::new(internal_config, &task) [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/cli_commands/diff_steps.rs:58:54 [INFO] [stdout] | [INFO] [stdout] 58 | ..ExecutionPlanBuilder::new(external_config, &task) [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/cli_commands/diff_steps.rs:63:75 [INFO] [stdout] | [INFO] [stdout] 63 | &move |file: &mut File| write_as_string(&internal_execution_plan, &file), [INFO] [stdout] | ^^^^^ help: change this to: `file` [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/lib/cli_commands/diff_steps.rs:67:75 [INFO] [stdout] | [INFO] [stdout] 67 | &move |file: &mut File| write_as_string(&external_execution_plan, &file), [INFO] [stdout] | ^^^^^ help: change this to: `file` [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/lib/cli_commands/list_steps.rs:24:30 [INFO] [stdout] | [INFO] [stdout] 24 | let output = create_list(&config, output_format, category, hide_uninteresting)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/lib/cli_commands/list_steps.rs:28:33 [INFO] [stdout] | [INFO] [stdout] 28 | io::write_text_file(&file, &output); [INFO] [stdout] | ^^^^^ help: change this to: `file` [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/lib/cli_commands/list_steps.rs:49:69 [INFO] [stdout] | [INFO] [stdout] 49 | let actual_task_name = execution_plan::get_actual_task_name(&config, &key)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/lib/cli_commands/list_steps.rs:49:78 [INFO] [stdout] | [INFO] [stdout] 49 | let actual_task_name = execution_plan::get_actual_task_name(&config, &key)?; [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/cli_commands/list_steps.rs:51:56 [INFO] [stdout] | [INFO] [stdout] 51 | let task = execution_plan::get_normalized_task(&config, &actual_task_name, true)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:53:26 [INFO] [stdout] | [INFO] [stdout] 53 | let is_private = match task.private { [INFO] [stdout] | __________________________^ [INFO] [stdout] 54 | | Some(private) => private, [INFO] [stdout] 55 | | None => false, [INFO] [stdout] 56 | | }; [INFO] [stdout] | |_________^ help: ascribe the type bool and replace your expression with: `task.private.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:76:16 [INFO] [stdout] | [INFO] [stdout] 76 | if category_filter [INFO] [stdout] | ________________^ [INFO] [stdout] 77 | | .as_ref() [INFO] [stdout] 78 | | .map_or(false, |value| value != &category) [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 78 - .map_or(false, |value| value != &category) [INFO] [stdout] 78 + .is_some_and(|value| value != &category) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:108:25 [INFO] [stdout] | [INFO] [stdout] 108 | buffer.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `buffer.push(')')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:116:28 [INFO] [stdout] | [INFO] [stdout] 116 | let mut text = String::from(description); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `description` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:135:26 [INFO] [stdout] | [INFO] [stdout] 135 | buffer.push_str(&format!("# Task List\n\n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"# Task List\n\n".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: this `map_or` can be simplified [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:140:12 [INFO] [stdout] | [INFO] [stdout] 140 | if category_filter [INFO] [stdout] | ____________^ [INFO] [stdout] 141 | | .as_ref() [INFO] [stdout] 142 | | .map_or(false, |value| value != category) [INFO] [stdout] | |_____________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 142 - .map_or(false, |value| value != category) [INFO] [stdout] 142 + .is_some_and(|value| value != category) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:159:34 [INFO] [stdout] | [INFO] [stdout] 159 | buffer.push_str(&format!("* **")); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.to_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: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/cli_commands/print_steps.rs:28:37 [INFO] [stdout] | [INFO] [stdout] 28 | PrintFormat::Default => match other { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 29 | | PrintFormat::Default => true, [INFO] [stdout] 30 | | _ => false, [INFO] [stdout] 31 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 28 - PrintFormat::Default => match other { [INFO] [stdout] 29 - PrintFormat::Default => true, [INFO] [stdout] 30 - _ => false, [INFO] [stdout] 31 - }, [INFO] [stdout] 28 + PrintFormat::Default => matches!(other, PrintFormat::Default), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/cli_commands/print_steps.rs:32:46 [INFO] [stdout] | [INFO] [stdout] 32 | PrintFormat::ShortDescription => match other { [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 33 | | PrintFormat::ShortDescription => true, [INFO] [stdout] 34 | | _ => false, [INFO] [stdout] 35 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 32 - PrintFormat::ShortDescription => match other { [INFO] [stdout] 33 - PrintFormat::ShortDescription => true, [INFO] [stdout] 34 - _ => false, [INFO] [stdout] 35 - }, [INFO] [stdout] 32 + PrintFormat::ShortDescription => matches!(other, PrintFormat::ShortDescription), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lib/cli_commands/print_steps.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | counter = counter + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `counter += 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 function has too many arguments (8/7) [INFO] [stdout] --> src/lib/cli_commands/print_steps.rs:78:1 [INFO] [stdout] | [INFO] [stdout] 78 | / pub fn print( [INFO] [stdout] 79 | | output_buffer: &mut impl io::Write, [INFO] [stdout] 80 | | config: &Config, [INFO] [stdout] 81 | | task: &str, [INFO] [stdout] ... | [INFO] [stdout] 86 | | skip_init_end_tasks: bool, [INFO] [stdout] 87 | | ) -> Result<(), CargoMakeError> { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` 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/lib/cli_commands/print_steps.rs:104:37 [INFO] [stdout] | [INFO] [stdout] 104 | ..ExecutionPlanBuilder::new(&config, &task) [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/lib/cli_commands/print_steps.rs:104:46 [INFO] [stdout] | [INFO] [stdout] 104 | ..ExecutionPlanBuilder::new(&config, &task) [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/cli_commands/print_steps.rs:109:40 [INFO] [stdout] | [INFO] [stdout] 109 | let print_format = get_format_type(&output_format); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `output_format` [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/lib/cli_parser.rs:42:27 [INFO] [stdout] | [INFO] [stdout] 42 | cli_args.build_file = match cli_parsed.get_first_value("makefile") { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 43 | | Some(value) => Some(value), [INFO] [stdout] 44 | | None => None, [INFO] [stdout] 45 | | }; [INFO] [stdout] | |_____^ help: try: `cli_parsed.get_first_value("makefile").map(|value| value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/cli_parser.rs:47:27 [INFO] [stdout] | [INFO] [stdout] 47 | cli_args.completion = match cli_parsed.get_first_value("completion") { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 48 | | Some(value) => Some(value.to_string()), [INFO] [stdout] 49 | | None => None, [INFO] [stdout] 50 | | }; [INFO] [stdout] | |_____^ help: try: `cli_parsed.get_first_value("completion").map(|value| value.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/cli_parser.rs:71:33 [INFO] [stdout] | [INFO] [stdout] 71 | let default_disable_color = match global_config.disable_color { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 72 | | Some(value) => value, [INFO] [stdout] 73 | | None => false, [INFO] [stdout] 74 | | }; [INFO] [stdout] | |_____^ help: replace it with: `global_config.disable_color.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/cli_parser.rs:82:25 [INFO] [stdout] | [INFO] [stdout] 82 | cli_args.env_file = match cli_parsed.get_first_value("envfile") { [INFO] [stdout] | _________________________^ [INFO] [stdout] 83 | | Some(value) => Some(value.to_string()), [INFO] [stdout] 84 | | None => None, [INFO] [stdout] 85 | | }; [INFO] [stdout] | |_____^ help: try: `cli_parsed.get_first_value("envfile").map(|value| value.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/cli_parser.rs:92:36 [INFO] [stdout] | [INFO] [stdout] 92 | cli_args.list_category_steps = match cli_parsed.get_first_value("list-category-steps") { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 93 | | Some(value) => Some(value.to_string()), [INFO] [stdout] 94 | | None => None, [INFO] [stdout] 95 | | }; [INFO] [stdout] | |_____^ help: try: `cli_parsed.get_first_value("list-category-steps").map(|value| value.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/cli_parser.rs:97:28 [INFO] [stdout] | [INFO] [stdout] 97 | cli_args.output_file = match cli_parsed.get_first_value("output-file") { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 98 | | Some(value) => Some(value.to_string()), [INFO] [stdout] 99 | | None => None, [INFO] [stdout] 100 | | }; [INFO] [stdout] | |_____^ help: try: `cli_parsed.get_first_value("output-file").map(|value| value.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/cli_parser.rs:118:35 [INFO] [stdout] | [INFO] [stdout] 118 | cli_args.skip_tasks_pattern = match cli_parsed.get_first_value("skip-tasks-pattern") { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 119 | | Some(value) => Some(value.to_string()), [INFO] [stdout] 120 | | None => None, [INFO] [stdout] 121 | | }; [INFO] [stdout] | |_____^ help: try: `cli_parsed.get_first_value("skip-tasks-pattern").map(|value| value.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/lib/cli_parser.rs:132:29 [INFO] [stdout] | [INFO] [stdout] 132 | let (task, arguments) = match task_cmd_slice { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 133 | | &[] => (task, None), [INFO] [stdout] 134 | | &[ref task_name, ref task_args @ ..] => { [INFO] [stdout] 135 | | let args_strings = task_args.iter().map(|item| item.to_string()).collect(); [INFO] [stdout] ... | [INFO] [stdout] 138 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 132 ~ let (task, arguments) = match *task_cmd_slice { [INFO] [stdout] 133 ~ [] => (task, None), [INFO] [stdout] 134 ~ [ref task_name, ref task_args @ ..] => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/cli_parser.rs:148:17 [INFO] [stdout] | [INFO] [stdout] 148 | None => &DEFAULT_TASK_NAME, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `DEFAULT_TASK_NAME` [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/lib/cli_parser.rs:152:17 [INFO] [stdout] | [INFO] [stdout] 152 | None => &DEFAULT_LOG_LEVEL, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `DEFAULT_LOG_LEVEL` [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/lib/cli_parser.rs:515:13 [INFO] [stdout] | [INFO] [stdout] 515 | &global_config, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `global_config` [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/lib/cli_parser.rs:532:20 [INFO] [stdout] | [INFO] [stdout] 532 | create_cli(&global_config, CliSpec::new(), true), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `global_config` [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/lib/cli_parser.rs:537:5 [INFO] [stdout] | [INFO] [stdout] 537 | / match vec_option { [INFO] [stdout] 538 | | Some(vec) => Some(vec.to_owned()), [INFO] [stdout] 539 | | None => None, [INFO] [stdout] 540 | | } [INFO] [stdout] | |_____^ help: try: `vec_option.map(|vec| vec.to_owned())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/lib/command.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | / match code.code() { [INFO] [stdout] 27 | | Some(value) => value, [INFO] [stdout] 28 | | None => -1, [INFO] [stdout] 29 | | } [INFO] [stdout] | |_________________^ help: replace with: `code.code().unwrap_or(-1)` [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: you don't need to add `&` to all patterns [INFO] [stdout] --> src/lib/command.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | / match output { [INFO] [stdout] 46 | | &Ok(ref output_struct) => get_exit_code(Ok(output_struct.status), force), [INFO] [stdout] 47 | | &Err(ref error) => { [INFO] [stdout] 48 | | if !force { [INFO] [stdout] ... | [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 45 ~ match *output { [INFO] [stdout] 46 ~ Ok(ref output_struct) => get_exit_code(Ok(output_struct.status), force), [INFO] [stdout] 47 ~ Err(ref error) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/command.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | &Ok(ref output_struct) => get_exit_code(Ok(output_struct.status), force), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 46 - &Ok(ref output_struct) => get_exit_code(Ok(output_struct.status), force), [INFO] [stdout] 46 + Ok(output_struct) => get_exit_code(Ok(output_struct.status), force), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/command.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | &Err(ref error) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 47 - &Err(ref error) => { [INFO] [stdout] 47 + Err(error) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/command.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | / match level { [INFO] [stdout] 77 | | logger::LogLevel::ERROR => true, [INFO] [stdout] 78 | | logger::LogLevel::OFF => true, [INFO] [stdout] 79 | | _ => false, [INFO] [stdout] 80 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 76 - match level { [INFO] [stdout] 77 - logger::LogLevel::ERROR => true, [INFO] [stdout] 78 - logger::LogLevel::OFF => true, [INFO] [stdout] 79 - _ => false, [INFO] [stdout] 80 - } [INFO] [stdout] 76 + matches!(level, logger::LogLevel::ERROR | logger::LogLevel::OFF) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/command.rs:105:5 [INFO] [stdout] | [INFO] [stdout] 105 | / match level { [INFO] [stdout] 106 | | logger::LogLevel::VERBOSE => true, [INFO] [stdout] 107 | | _ => false, [INFO] [stdout] 108 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 105 - match level { [INFO] [stdout] 106 - logger::LogLevel::VERBOSE => true, [INFO] [stdout] 107 - _ => false, [INFO] [stdout] 108 - } [INFO] [stdout] 105 + matches!(level, logger::LogLevel::VERBOSE) [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/lib/command.rs:113:19 [INFO] [stdout] | [INFO] [stdout] 113 | script_lines: &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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 113 - script_lines: &Vec, [INFO] [stdout] 113 + script_lines: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/command.rs:152:40 [INFO] [stdout] | [INFO] [stdout] 152 | let output = run_script_get_output(&script_lines, script_runner, cli_arguments, false, None); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `script_lines` [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/lib/command.rs:176:36 [INFO] [stdout] | [INFO] [stdout] 176 | let mut command = Command::new(&command_string); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `command_string` [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: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib/command.rs:224:13 [INFO] [stdout] | [INFO] [stdout] 224 | Err(Error::new( [INFO] [stdout] | _____________^ [INFO] [stdout] 225 | | ErrorKind::Other, [INFO] [stdout] 226 | | "Shutting down - cannot run the command.", [INFO] [stdout] 227 | | ))?; [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] 224 ~ Err(Error::other( [INFO] [stdout] 225 ~ "Shutting down - cannot run the command.", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/command.rs:270:41 [INFO] [stdout] | [INFO] [stdout] 270 | let output = run_command_get_output(&command_string, &args, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `command_string` [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/lib/command.rs:270:58 [INFO] [stdout] | [INFO] [stdout] 270 | let output = run_command_get_output(&command_string, &args, false); [INFO] [stdout] | ^^^^^ help: change this to: `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/lib/command.rs:286:41 [INFO] [stdout] | [INFO] [stdout] 286 | let output = run_command_get_output(&command_string, &args, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `command_string` [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/lib/command.rs:286:58 [INFO] [stdout] | [INFO] [stdout] 286 | let output = run_command_get_output(&command_string, &args, true); [INFO] [stdout] | ^^^^^ help: change this to: `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/lib/command.rs:311:45 [INFO] [stdout] | [INFO] [stdout] 311 | toolchain::wrap_command(&toolchain, &command_string, &step.config.args) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `toolchain` [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/lib/command.rs:311:57 [INFO] [stdout] | [INFO] [stdout] 311 | toolchain::wrap_command(&toolchain, &command_string, &step.config.args) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `command_string` [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/lib/condition.rs:247:51 [INFO] [stdout] | [INFO] [stdout] 247 | ... .position(|value| *value == "stable".to_string()), [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: this creates an owned instance just for comparison [INFO] [stdout] --> src/lib/condition.rs:250:51 [INFO] [stdout] | [INFO] [stdout] 250 | ... .position(|value| *value == "beta".to_string()), [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] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/lib/condition.rs:253:51 [INFO] [stdout] | [INFO] [stdout] 253 | ... .position(|value| *value == "nightly".to_string()), [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] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `rustinfo.version` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/condition.rs:275:31 [INFO] [stdout] | [INFO] [stdout] 274 | if rustinfo.version.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = rustinfo.version` [INFO] [stdout] 275 | let current_version = rustinfo.version.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/condition.rs:320:31 [INFO] [stdout] | [INFO] [stdout] 320 | fn validate_files(file_paths: &Vec, exist: bool, validate_any: bool) -> bool { [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] 320 - fn validate_files(file_paths: &Vec, exist: bool, validate_any: bool) -> bool { [INFO] [stdout] 320 + fn validate_files(file_paths: &[String], exist: bool, validate_any: bool) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/condition.rs:363:16 [INFO] [stdout] | [INFO] [stdout] 363 | if files_modified.input.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `files_modified.input.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/condition.rs:482:41 [INFO] [stdout] | [INFO] [stdout] 482 | let mut valid = validate_os(&condition_struct); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:491:39 [INFO] [stdout] | [INFO] [stdout] 491 | valid = validate_platform(&condition_struct); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:500:38 [INFO] [stdout] | [INFO] [stdout] 500 | valid = validate_profile(&condition_struct); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:509:38 [INFO] [stdout] | [INFO] [stdout] 509 | valid = validate_channel(&condition_struct, flow_info); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:518:34 [INFO] [stdout] | [INFO] [stdout] 518 | valid = validate_env(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:527:38 [INFO] [stdout] | [INFO] [stdout] 527 | valid = validate_env_not(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:536:38 [INFO] [stdout] | [INFO] [stdout] 536 | valid = validate_env_set(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:545:42 [INFO] [stdout] | [INFO] [stdout] 545 | valid = validate_env_not_set(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:554:39 [INFO] [stdout] | [INFO] [stdout] 554 | valid = validate_env_bool(&condition_struct, true, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:563:39 [INFO] [stdout] | [INFO] [stdout] 563 | valid = validate_env_bool(&condition_struct, false, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:572:43 [INFO] [stdout] | [INFO] [stdout] 572 | valid = validate_env_contains(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:581:43 [INFO] [stdout] | [INFO] [stdout] 581 | valid = validate_rust_version(&condition_struct); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:590:42 [INFO] [stdout] | [INFO] [stdout] 590 | valid = validate_files_exist(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:599:46 [INFO] [stdout] | [INFO] [stdout] 599 | valid = validate_files_not_exist(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:608:45 [INFO] [stdout] | [INFO] [stdout] 608 | valid = validate_files_modified(&condition_struct); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:636:13 [INFO] [stdout] | [INFO] [stdout] 636 | / return scriptengine::invoke_script_pre_flow( [INFO] [stdout] 637 | | &ScriptValue::Text(script_text), [INFO] [stdout] 638 | | script_runner, [INFO] [stdout] 639 | | script_runner_args, [INFO] [stdout] ... | [INFO] [stdout] 642 | | &vec![], [INFO] [stdout] 643 | | ); [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] 636 ~ scriptengine::invoke_script_pre_flow( [INFO] [stdout] 637 + &ScriptValue::Text(script_text), [INFO] [stdout] 638 + script_runner, [INFO] [stdout] 639 + script_runner_args, [INFO] [stdout] 640 + None, [INFO] [stdout] 641 + false, [INFO] [stdout] 642 + &vec![], [INFO] [stdout] 643 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/condition.rs:665:50 [INFO] [stdout] | [INFO] [stdout] 665 | let criteria_passed = validate_criteria(Some(&flow_info), &condition); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/condition.rs:665:63 [INFO] [stdout] | [INFO] [stdout] 665 | let criteria_passed = validate_criteria(Some(&flow_info), &condition); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `condition` [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/lib/condition.rs:674:29 [INFO] [stdout] | [INFO] [stdout] 674 | validate_script(&condition_script, script_runner, script_runner_args) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_script` [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/lib/condition.rs:684:9 [INFO] [stdout] | [INFO] [stdout] 684 | &flow_info, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/descriptor/descriptor_deserializer.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | / return Err(CargoMakeError::ParseFileFailed( [INFO] [stdout] 54 | | String::from(file), [INFO] [stdout] 55 | | error.to_string(), [INFO] [stdout] 56 | | )); [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] 53 ~ Err(CargoMakeError::ParseFileFailed( [INFO] [stdout] 54 + String::from(file), [INFO] [stdout] 55 + error.to_string(), [INFO] [stdout] 56 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/lib/descriptor/env.rs:24:35 [INFO] [stdout] | [INFO] [stdout] 24 | for (key, val) in vals.iter().map(|map| map.iter()).flatten().rev() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|map| map.iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/descriptor/env.rs:146:42 [INFO] [stdout] | [INFO] [stdout] 146 | let is_external = envmnt::exists(&key); [INFO] [stdout] | ^^^^ help: change this to: `key` [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: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/lib/descriptor/env.rs:193:35 [INFO] [stdout] | [INFO] [stdout] 193 | if let Some((key, val)) = combined [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 194 | | .iter() [INFO] [stdout] 195 | | .filter(|(key, _)| *key == name) [INFO] [stdout] 196 | | .last() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 196 - .last() [INFO] [stdout] 196 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/descriptor/env.rs:217:11 [INFO] [stdout] | [INFO] [stdout] 217 | base: &mut 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] 217 - base: &mut Vec, [INFO] [stdout] 217 + base: &mut [EnvFile], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/descriptor/env.rs:218:15 [INFO] [stdout] | [INFO] [stdout] 218 | extended: &mut 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] 218 - extended: &mut Vec, [INFO] [stdout] 218 + extended: &mut [EnvFile], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/descriptor/env.rs:223:39 [INFO] [stdout] | [INFO] [stdout] 223 | pub(crate) fn merge_env_scripts(base: &mut Vec, extended: &mut 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] 223 - pub(crate) fn merge_env_scripts(base: &mut Vec, extended: &mut Vec) -> Vec { [INFO] [stdout] 223 + pub(crate) fn merge_env_scripts(base: &mut [String], extended: &mut Vec) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/descriptor/env.rs:223:67 [INFO] [stdout] | [INFO] [stdout] 223 | pub(crate) fn merge_env_scripts(base: &mut Vec, extended: &mut 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] 223 - pub(crate) fn merge_env_scripts(base: &mut Vec, extended: &mut Vec) -> Vec { [INFO] [stdout] 223 + pub(crate) fn merge_env_scripts(base: &mut Vec, extended: &mut [String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/descriptor/mod.rs:65:33 [INFO] [stdout] | [INFO] [stdout] 65 | let clear = task.clear.clone().unwrap_or(false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.clear` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/lib/descriptor/mod.rs:57:18 [INFO] [stdout] | [INFO] [stdout] 57 | Some(ref value) => { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 57 - Some(ref value) => { [INFO] [stdout] 57 + Some(value) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/descriptor/mod.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | / match external_config.env_files { [INFO] [stdout] 99 | | Some(env_files) => { [INFO] [stdout] 100 | | let mut modified_env_files = vec![]; [INFO] [stdout] ... | [INFO] [stdout] 122 | | None => (), [INFO] [stdout] 123 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 98 ~ if let Some(env_files) = external_config.env_files { [INFO] [stdout] 99 + let mut modified_env_files = vec![]; [INFO] [stdout] 100 + [INFO] [stdout] 101 + for env_file in env_files { [INFO] [stdout] 102 + match env_file { [INFO] [stdout] 103 + EnvFile::Path(path) => { [INFO] [stdout] 104 + let mut info = EnvFileInfo::new(path); [INFO] [stdout] 105 + info.base_path = Some(base_directory.clone()); [INFO] [stdout] 106 + [INFO] [stdout] 107 + modified_env_files.push(EnvFile::Info(info)); [INFO] [stdout] 108 + } [INFO] [stdout] 109 + EnvFile::Info(mut info) => { [INFO] [stdout] 110 + if info.base_path.is_none() { [INFO] [stdout] 111 + info.base_path = Some(base_directory.clone()); [INFO] [stdout] 112 + } [INFO] [stdout] 113 + [INFO] [stdout] 114 + modified_env_files.push(EnvFile::Info(info)); [INFO] [stdout] 115 + } [INFO] [stdout] 116 + } [INFO] [stdout] 117 + } [INFO] [stdout] 118 + [INFO] [stdout] 119 + external_config.env_files = Some(modified_env_files); [INFO] [stdout] 120 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `parent_config.config` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/descriptor/mod.rs:229:39 [INFO] [stdout] | [INFO] [stdout] 228 | if parent_config.config.is_some() { [INFO] [stdout] | --------------------------------- help: try: `if let Some() = parent_config.config` [INFO] [stdout] 229 | let mut config_section_data = parent_config.config.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: called `unwrap` on `config.config` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/descriptor/mod.rs:234:39 [INFO] [stdout] | [INFO] [stdout] 233 | if config.config.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = config.config` [INFO] [stdout] 234 | let mut config_section_data = config.config.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/descriptor/mod.rs:184:32 [INFO] [stdout] | [INFO] [stdout] 184 | let mut parent_env_files = match parent_config.env_files { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 185 | | Some(env_files) => env_files, [INFO] [stdout] 186 | | None => vec![], [INFO] [stdout] 187 | | }; [INFO] [stdout] | |_____^ help: replace it with: `parent_config.env_files.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/descriptor/mod.rs:188:34 [INFO] [stdout] | [INFO] [stdout] 188 | let mut extended_env_files = match config.env_files { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 189 | | Some(env_files) => env_files, [INFO] [stdout] 190 | | None => vec![], [INFO] [stdout] 191 | | }; [INFO] [stdout] | |_____^ help: replace it with: `config.env_files.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/mod.rs:203:29 [INFO] [stdout] | [INFO] [stdout] 203 | let all_env = merge_env(&mut parent_env, &mut extended_env)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 203 - let all_env = merge_env(&mut parent_env, &mut extended_env)?; [INFO] [stdout] 203 + let all_env = merge_env(&parent_env, &mut extended_env)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/mod.rs:203:46 [INFO] [stdout] | [INFO] [stdout] 203 | let all_env = merge_env(&mut parent_env, &mut extended_env)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 203 - let all_env = merge_env(&mut parent_env, &mut extended_env)?; [INFO] [stdout] 203 + let all_env = merge_env(&mut parent_env, &extended_env)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/descriptor/mod.rs:206:34 [INFO] [stdout] | [INFO] [stdout] 206 | let mut parent_env_scripts = match parent_config.env_scripts { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 207 | | Some(env_scripts) => env_scripts, [INFO] [stdout] 208 | | None => vec![], [INFO] [stdout] 209 | | }; [INFO] [stdout] | |_____^ help: replace it with: `parent_config.env_scripts.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/descriptor/mod.rs:210:36 [INFO] [stdout] | [INFO] [stdout] 210 | let mut extended_env_scripts = match config.env_scripts { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 211 | | Some(env_scripts) => env_scripts, [INFO] [stdout] 212 | | None => vec![], [INFO] [stdout] 213 | | }; [INFO] [stdout] | |_____^ help: replace it with: `config.env_scripts.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/descriptor/mod.rs:260:51 [INFO] [stdout] | [INFO] [stdout] 260 | load_external_descriptor(parent_path, &base_file, true, false, RelativeTo::Makefile) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `base_file` [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/lib/descriptor/mod.rs:305:51 [INFO] [stdout] | [INFO] [stdout] 305 | let value: toml::Value = match toml::from_str(&external_descriptor) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `external_descriptor` [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/lib/descriptor/mod.rs:318:36 [INFO] [stdout] | [INFO] [stdout] 318 | if version::is_newer_found(&min_version) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `min_version` [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/lib/descriptor/mod.rs:407:56 [INFO] [stdout] | [INFO] [stdout] 407 | load_descriptor_extended_makefiles(&parent_path, extend_struct)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `parent_path` [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/lib/descriptor/mod.rs:439:64 [INFO] [stdout] | [INFO] [stdout] 439 | let mut base_config = descriptor_deserializer::load_config(&base_descriptor, false)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `base_descriptor` [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/lib/descriptor/mod.rs:447:50 [INFO] [stdout] | [INFO] [stdout] 447 | descriptor_deserializer::load_config(&experimental_descriptor, false)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `experimental_descriptor` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/descriptor/mod.rs:461:5 [INFO] [stdout] | [INFO] [stdout] 461 | / match modify_config { [INFO] [stdout] 462 | | Some(props) => { [INFO] [stdout] 463 | | base_config.apply(&props); [INFO] [stdout] ... | [INFO] [stdout] 475 | | None => (), [INFO] [stdout] 476 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 461 ~ if let Some(props) = modify_config { [INFO] [stdout] 462 + base_config.apply(&props); [INFO] [stdout] 463 + [INFO] [stdout] 464 + match props.namespace { [INFO] [stdout] 465 + Some(ref namespace) => { [INFO] [stdout] 466 + let prefix = props.get_namespace_prefix(); [INFO] [stdout] 467 + [INFO] [stdout] 468 + envmnt::set("CARGO_MAKE_CORE_TASK_NAMESPACE", &namespace); [INFO] [stdout] 469 + envmnt::set("CARGO_MAKE_CORE_TASK_NAMESPACE_PREFIX", &prefix); [INFO] [stdout] 470 + } [INFO] [stdout] 471 + None => (), [INFO] [stdout] 472 + }; [INFO] [stdout] 473 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/descriptor/mod.rs:465:13 [INFO] [stdout] | [INFO] [stdout] 465 | / match props.namespace { [INFO] [stdout] 466 | | Some(ref namespace) => { [INFO] [stdout] 467 | | let prefix = props.get_namespace_prefix(); [INFO] [stdout] ... | [INFO] [stdout] 472 | | None => (), [INFO] [stdout] 473 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 465 ~ if let Some(ref namespace) = props.namespace { [INFO] [stdout] 466 + let prefix = props.get_namespace_prefix(); [INFO] [stdout] 467 + [INFO] [stdout] 468 + envmnt::set("CARGO_MAKE_CORE_TASK_NAMESPACE", &namespace); [INFO] [stdout] 469 + envmnt::set("CARGO_MAKE_CORE_TASK_NAMESPACE_PREFIX", &prefix); [INFO] [stdout] 470 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/descriptor/mod.rs:469:67 [INFO] [stdout] | [INFO] [stdout] 469 | envmnt::set("CARGO_MAKE_CORE_TASK_NAMESPACE", &namespace); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `namespace` [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: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/descriptor/mod.rs:493:21 [INFO] [stdout] | [INFO] [stdout] 493 | let env_files = match external_config.env_files { [INFO] [stdout] | _____________________^ [INFO] [stdout] 494 | | Some(env_files) => env_files, [INFO] [stdout] 495 | | None => vec![], [INFO] [stdout] 496 | | }; [INFO] [stdout] | |_____^ help: replace it with: `external_config.env_files.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/descriptor/mod.rs:498:23 [INFO] [stdout] | [INFO] [stdout] 498 | let env_scripts = match external_config.env_scripts { [INFO] [stdout] | _______________________^ [INFO] [stdout] 499 | | Some(env_scripts) => env_scripts, [INFO] [stdout] 500 | | None => vec![], [INFO] [stdout] 501 | | }; [INFO] [stdout] | |_____^ help: replace it with: `external_config.env_scripts.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/mod.rs:510:33 [INFO] [stdout] | [INFO] [stdout] 510 | let mut all_env = merge_env(&mut base_env, &mut external_env)?; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 510 - let mut all_env = merge_env(&mut base_env, &mut external_env)?; [INFO] [stdout] 510 + let mut all_env = merge_env(&base_env, &mut external_env)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/mod.rs:510:48 [INFO] [stdout] | [INFO] [stdout] 510 | let mut all_env = merge_env(&mut base_env, &mut external_env)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 510 - let mut all_env = merge_env(&mut base_env, &mut external_env)?; [INFO] [stdout] 510 + let mut all_env = merge_env(&mut base_env, &external_env)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/lib/descriptor/mod.rs:541:55 [INFO] [stdout] | [INFO] [stdout] 541 | config_section.extend(&mut external_config.config.unwrap_or(ConfigSection::new())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `split_once` [INFO] [stdout] --> src/lib/descriptor/mod.rs:558:5 [INFO] [stdout] | [INFO] [stdout] 558 | let mut parts = value.splitn(2, delimiter); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 559 | let part1 = parts.next()?; [INFO] [stdout] | -------------------------- first usage here [INFO] [stdout] 560 | let part2 = parts.next()?; [INFO] [stdout] | -------------------------- second usage here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once [INFO] [stdout] = note: `#[warn(clippy::manual_split_once)]` on by default [INFO] [stdout] help: replace with `split_once` [INFO] [stdout] | [INFO] [stdout] 558 ~ let (part1, part2) = value.split_once(delimiter)?; [INFO] [stdout] 559 ~ [INFO] [stdout] 560 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/descriptor/mod.rs:654:39 [INFO] [stdout] | [INFO] [stdout] 654 | let mut config = load_descriptors(&file_name, force, env_map.clone(), false, false, None)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/lib/descriptor/mod.rs:665:25 [INFO] [stdout] | [INFO] [stdout] 665 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:78:17 [INFO] [stdout] | [INFO] [stdout] 78 | / match entry { [INFO] [stdout] 79 | | Ok(path) => { [INFO] [stdout] 80 | | let should_add = if emulation { [INFO] [stdout] ... | [INFO] [stdout] 99 | | _ => (), [INFO] [stdout] 100 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 78 ~ if let Ok(path) = entry { [INFO] [stdout] 79 + let should_add = if emulation { [INFO] [stdout] 80 + // emulation may be used for non rust projects [INFO] [stdout] 81 + // so no extra validations [INFO] [stdout] 82 + true [INFO] [stdout] 83 + } else { [INFO] [stdout] 84 + // ensure Cargo.toml is found [INFO] [stdout] 85 + let mut cargo_path = path.clone(); [INFO] [stdout] 86 + cargo_path.push("Cargo.toml"); [INFO] [stdout] 87 + let exists = cargo_path.exists(); [INFO] [stdout] 88 + [INFO] [stdout] 89 + exists [INFO] [stdout] 90 + }; [INFO] [stdout] 91 + [INFO] [stdout] 92 + if should_add { [INFO] [stdout] 93 + let mut updated_path = path.to_str().unwrap().to_string(); [INFO] [stdout] 94 + updated_path = updated_path.replace("\\", "/"); [INFO] [stdout] 95 + members.push(updated_path); [INFO] [stdout] 96 + } [INFO] [stdout] 97 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lib/environment/crateinfo.rs:90:29 [INFO] [stdout] | [INFO] [stdout] 88 | ... let exists = cargo_path.exists(); [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 89 | ... [INFO] [stdout] 90 | ... exists [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 88 ~ [INFO] [stdout] 89 | [INFO] [stdout] 90 ~ cargo_path.exists() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | / match crate_info.workspace { [INFO] [stdout] 111 | | Some(ref mut workspace) => { [INFO] [stdout] 112 | | if let Some(ref mut members) = workspace.members { [INFO] [stdout] 113 | | let existing_members = members.clone(); [INFO] [stdout] ... | [INFO] [stdout] 129 | | None => (), //not a workspace [INFO] [stdout] 130 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 110 ~ if let Some(ref mut workspace) = crate_info.workspace { [INFO] [stdout] 111 + if let Some(ref mut members) = workspace.members { [INFO] [stdout] 112 + let existing_members = members.clone(); [INFO] [stdout] 113 + [INFO] [stdout] 114 + let mut index = 0; [INFO] [stdout] 115 + for member in existing_members.iter() { [INFO] [stdout] 116 + // glob [INFO] [stdout] 117 + if member.contains("*") { [INFO] [stdout] 118 + let mut expanded_members = expand_glob_members(&member); [INFO] [stdout] 119 + [INFO] [stdout] 120 + members.remove(index); [INFO] [stdout] 121 + members.append(&mut expanded_members); [INFO] [stdout] 122 + } else { [INFO] [stdout] 123 + index = index + 1; [INFO] [stdout] 124 + } [INFO] [stdout] 125 + } [INFO] [stdout] 126 + } [INFO] [stdout] 127 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/environment/crateinfo.rs:119:72 [INFO] [stdout] | [INFO] [stdout] 119 | let mut expanded_members = expand_glob_members(&member); [INFO] [stdout] | ^^^^^^^ help: change this to: `member` [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/lib/environment/crateinfo.rs:124:25 [INFO] [stdout] | [INFO] [stdout] 124 | 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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | / match dependencies { [INFO] [stdout] 153 | | Some(ref dependencies) => { [INFO] [stdout] 154 | | for value in dependencies.values() { [INFO] [stdout] 155 | | match *value { [INFO] [stdout] ... | [INFO] [stdout] 176 | | None => (), [INFO] [stdout] 177 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 152 ~ if let Some(ref dependencies) = dependencies { [INFO] [stdout] 153 + for value in dependencies.values() { [INFO] [stdout] 154 + match *value { [INFO] [stdout] 155 + CrateDependency::Info(ref info) => match info.path { [INFO] [stdout] 156 + Some(ref path) => { [INFO] [stdout] 157 + // workspace dependencies are members only if inside the workspace [INFO] [stdout] 158 + // directory (this is a simple not accurate check for that) [INFO] [stdout] 159 + if ensure_inside_workspace && path.starts_with("..") { [INFO] [stdout] 160 + // skip [INFO] [stdout] 161 + } else if path.starts_with("./") { [INFO] [stdout] 162 + let member_path = [INFO] [stdout] 163 + path.chars().skip(2).take(path.len() - 2).collect(); [INFO] [stdout] 164 + members.push(member_path); [INFO] [stdout] 165 + } else if Path::new(path).is_relative() { [INFO] [stdout] 166 + members.push(path.to_string()); [INFO] [stdout] 167 + } [INFO] [stdout] 168 + } [INFO] [stdout] 169 + None => (), [INFO] [stdout] 170 + }, [INFO] [stdout] 171 + _ => (), [INFO] [stdout] 172 + }; [INFO] [stdout] 173 + } [INFO] [stdout] 174 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:155:17 [INFO] [stdout] | [INFO] [stdout] 155 | / match *value { [INFO] [stdout] 156 | | CrateDependency::Info(ref info) => match info.path { [INFO] [stdout] 157 | | Some(ref path) => { [INFO] [stdout] ... | [INFO] [stdout] 172 | | _ => (), [INFO] [stdout] 173 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 155 ~ if let CrateDependency::Info(ref info) = *value { match info.path { [INFO] [stdout] 156 + Some(ref path) => { [INFO] [stdout] 157 + // workspace dependencies are members only if inside the workspace [INFO] [stdout] 158 + // directory (this is a simple not accurate check for that) [INFO] [stdout] 159 + if ensure_inside_workspace && path.starts_with("..") { [INFO] [stdout] 160 + // skip [INFO] [stdout] 161 + } else if path.starts_with("./") { [INFO] [stdout] 162 + let member_path = [INFO] [stdout] 163 + path.chars().skip(2).take(path.len() - 2).collect(); [INFO] [stdout] 164 + members.push(member_path); [INFO] [stdout] 165 + } else if Path::new(path).is_relative() { [INFO] [stdout] 166 + members.push(path.to_string()); [INFO] [stdout] 167 + } [INFO] [stdout] 168 + } [INFO] [stdout] 169 + None => (), [INFO] [stdout] 170 ~ } }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:156:56 [INFO] [stdout] | [INFO] [stdout] 156 | CrateDependency::Info(ref info) => match info.path { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 157 | | Some(ref path) => { [INFO] [stdout] ... | [INFO] [stdout] 170 | | None => (), [INFO] [stdout] 171 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 156 ~ CrateDependency::Info(ref info) => if let Some(ref path) = info.path { [INFO] [stdout] 157 + // workspace dependencies are members only if inside the workspace [INFO] [stdout] 158 + // directory (this is a simple not accurate check for that) [INFO] [stdout] 159 + if ensure_inside_workspace && path.starts_with("..") { [INFO] [stdout] 160 + // skip [INFO] [stdout] 161 + } else if path.starts_with("./") { [INFO] [stdout] 162 + let member_path = [INFO] [stdout] 163 + path.chars().skip(2).take(path.len() - 2).collect(); [INFO] [stdout] 164 + members.push(member_path); [INFO] [stdout] 165 + } else if Path::new(path).is_relative() { [INFO] [stdout] 166 + members.push(path.to_string()); [INFO] [stdout] 167 + } [INFO] [stdout] 168 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/environment/crateinfo.rs:183:8 [INFO] [stdout] | [INFO] [stdout] 183 | if new_members.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_members.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:184:9 [INFO] [stdout] | [INFO] [stdout] 184 | / match crate_info.workspace { [INFO] [stdout] 185 | | Some(ref mut workspace) => match workspace.members { [INFO] [stdout] 186 | | Some(ref mut members) => { [INFO] [stdout] 187 | | for new_member in new_members.iter() { [INFO] [stdout] ... | [INFO] [stdout] 198 | | None => (), //not a workspace [INFO] [stdout] 199 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 184 ~ if let Some(ref mut workspace) = crate_info.workspace { match workspace.members { [INFO] [stdout] 185 + Some(ref mut members) => { [INFO] [stdout] 186 + for new_member in new_members.iter() { [INFO] [stdout] 187 + let member_string = new_member.to_string(); [INFO] [stdout] 188 + [INFO] [stdout] 189 + match members.iter().position(|member| *member == member_string) { [INFO] [stdout] 190 + None => members.push(member_string), [INFO] [stdout] 191 + _ => (), [INFO] [stdout] 192 + } [INFO] [stdout] 193 + } [INFO] [stdout] 194 + } [INFO] [stdout] 195 + None => workspace.members = Some(new_members), [INFO] [stdout] 196 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:190:25 [INFO] [stdout] | [INFO] [stdout] 190 | / match members.iter().position(|member| *member == member_string) { [INFO] [stdout] 191 | | None => members.push(member_string), [INFO] [stdout] 192 | | _ => (), [INFO] [stdout] 193 | | } [INFO] [stdout] | |_________________________^ help: try: `if members.iter().position(|member| *member == member_string) == None { members.push(member_string) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:208:22 [INFO] [stdout] | [INFO] [stdout] 208 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:220:5 [INFO] [stdout] | [INFO] [stdout] 220 | / match crate_info.workspace { [INFO] [stdout] 221 | | Some(ref mut workspace) => match workspace.exclude { [INFO] [stdout] 222 | | Some(ref excludes) => match workspace.members { [INFO] [stdout] 223 | | Some(ref mut members) => { [INFO] [stdout] ... | [INFO] [stdout] 244 | | None => (), //not a workspace [INFO] [stdout] 245 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 220 ~ if let Some(ref mut workspace) = crate_info.workspace { match workspace.exclude { [INFO] [stdout] 221 + Some(ref excludes) => match workspace.members { [INFO] [stdout] 222 + Some(ref mut members) => { [INFO] [stdout] 223 + for exclude in excludes.iter() { [INFO] [stdout] 224 + let exclude_string = exclude.to_string(); [INFO] [stdout] 225 + [INFO] [stdout] 226 + let result = members.iter().position(|member| *member == exclude_string); [INFO] [stdout] 227 + match result { [INFO] [stdout] 228 + Some(index) => { [INFO] [stdout] 229 + members.remove(index); [INFO] [stdout] 230 + [INFO] [stdout] 231 + removed = true; [INFO] [stdout] 232 + [INFO] [stdout] 233 + () [INFO] [stdout] 234 + } [INFO] [stdout] 235 + None => (), [INFO] [stdout] 236 + }; [INFO] [stdout] 237 + } [INFO] [stdout] 238 + } [INFO] [stdout] 239 + None => (), [INFO] [stdout] 240 + }, [INFO] [stdout] 241 + None => (), [INFO] [stdout] 242 ~ } }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:221:36 [INFO] [stdout] | [INFO] [stdout] 221 | Some(ref mut workspace) => match workspace.exclude { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 222 | | Some(ref excludes) => match workspace.members { [INFO] [stdout] 223 | | Some(ref mut members) => { [INFO] [stdout] 224 | | for exclude in excludes.iter() { [INFO] [stdout] ... | [INFO] [stdout] 242 | | None => (), [INFO] [stdout] 243 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 221 ~ Some(ref mut workspace) => if let Some(ref excludes) = workspace.exclude { match workspace.members { [INFO] [stdout] 222 + Some(ref mut members) => { [INFO] [stdout] 223 + for exclude in excludes.iter() { [INFO] [stdout] 224 + let exclude_string = exclude.to_string(); [INFO] [stdout] 225 + [INFO] [stdout] 226 + let result = members.iter().position(|member| *member == exclude_string); [INFO] [stdout] 227 + match result { [INFO] [stdout] 228 + Some(index) => { [INFO] [stdout] 229 + members.remove(index); [INFO] [stdout] 230 + [INFO] [stdout] 231 + removed = true; [INFO] [stdout] 232 + [INFO] [stdout] 233 + () [INFO] [stdout] 234 + } [INFO] [stdout] 235 + None => (), [INFO] [stdout] 236 + }; [INFO] [stdout] 237 + } [INFO] [stdout] 238 + } [INFO] [stdout] 239 + None => (), [INFO] [stdout] 240 ~ } }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:222:35 [INFO] [stdout] | [INFO] [stdout] 222 | Some(ref excludes) => match workspace.members { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 223 | | Some(ref mut members) => { [INFO] [stdout] 224 | | for exclude in excludes.iter() { [INFO] [stdout] 225 | | let exclude_string = exclude.to_string(); [INFO] [stdout] ... | [INFO] [stdout] 240 | | None => (), [INFO] [stdout] 241 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 222 ~ Some(ref excludes) => if let Some(ref mut members) = workspace.members { [INFO] [stdout] 223 + for exclude in excludes.iter() { [INFO] [stdout] 224 + let exclude_string = exclude.to_string(); [INFO] [stdout] 225 + [INFO] [stdout] 226 + let result = members.iter().position(|member| *member == exclude_string); [INFO] [stdout] 227 + match result { [INFO] [stdout] 228 + Some(index) => { [INFO] [stdout] 229 + members.remove(index); [INFO] [stdout] 230 + [INFO] [stdout] 231 + removed = true; [INFO] [stdout] 232 + [INFO] [stdout] 233 + () [INFO] [stdout] 234 + } [INFO] [stdout] 235 + None => (), [INFO] [stdout] 236 + }; [INFO] [stdout] 237 + } [INFO] [stdout] 238 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:228:25 [INFO] [stdout] | [INFO] [stdout] 228 | / match result { [INFO] [stdout] 229 | | Some(index) => { [INFO] [stdout] 230 | | members.remove(index); [INFO] [stdout] ... | [INFO] [stdout] 236 | | None => (), [INFO] [stdout] 237 | | }; [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 228 ~ if let Some(index) = result { [INFO] [stdout] 229 + members.remove(index); [INFO] [stdout] 230 + [INFO] [stdout] 231 + removed = true; [INFO] [stdout] 232 + [INFO] [stdout] 233 + () [INFO] [stdout] 234 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/environment/crateinfo.rs:254:58 [INFO] [stdout] | [INFO] [stdout] 254 | let dependencies = get_members_from_dependencies(&crate_info); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `crate_info` [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/lib/environment/crateinfo.rs:256:78 [INFO] [stdout] | [INFO] [stdout] 256 | let workspace_dependencies = get_members_from_workspace_dependencies(&crate_info); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `crate_info` [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: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/environment/mod.rs:54:30 [INFO] [stdout] | [INFO] [stdout] 54 | let multi_line = match env_value.multi_line { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 55 | | Some(bool_value) => bool_value, [INFO] [stdout] 56 | | None => false, [INFO] [stdout] 57 | | }; [INFO] [stdout] | |_____________^ help: replace it with: `env_value.multi_line.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/environment/mod.rs:63:38 [INFO] [stdout] | [INFO] [stdout] 63 | lines.retain(|&line| line.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!line.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: length comparison to zero [INFO] [stdout] --> src/lib/environment/mod.rs:65:20 [INFO] [stdout] | [INFO] [stdout] 65 | if lines.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lines.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/environment/mod.rs:85:20 [INFO] [stdout] | [INFO] [stdout] 85 | envmnt::expand(&value, Some(options)) [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/lib/environment/mod.rs:89:34 [INFO] [stdout] | [INFO] [stdout] 89 | let env_value = expand_value(&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: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/environment/mod.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | envmnt::set(&key, &env_value); [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:97:22 [INFO] [stdout] | [INFO] [stdout] 97 | envmnt::set_bool(&key, value); [INFO] [stdout] | ^^^^ help: change this to: `key` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/environment/mod.rs:104:38 [INFO] [stdout] | [INFO] [stdout] 104 | let env_value = expand_value(&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: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/environment/mod.rs:108:22 [INFO] [stdout] | [INFO] [stdout] 108 | envmnt::set_list(&key, &expanded_list); [INFO] [stdout] | ^^^^ help: change this to: `key` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/environment/mod.rs:118:40 [INFO] [stdout] | [INFO] [stdout] 118 | let value = evaluate_env_value(&key, &env_value); [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:118:46 [INFO] [stdout] | [INFO] [stdout] 118 | let value = evaluate_env_value(&key, &env_value); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `env_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/lib/environment/mod.rs:120:30 [INFO] [stdout] | [INFO] [stdout] 120 | evaluate_and_set_env(&key, &value); [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:141:30 [INFO] [stdout] | [INFO] [stdout] 141 | evaluate_and_set_env(&key, &mapped_value); [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:154:30 [INFO] [stdout] | [INFO] [stdout] 154 | evaluate_and_set_env(&key, &value); [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:210:64 [INFO] [stdout] | [INFO] [stdout] 210 | EnvValue::Value(ref value) => evaluate_and_set_env(&key, value), [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:211:58 [INFO] [stdout] | [INFO] [stdout] 211 | EnvValue::Boolean(value) => set_env_for_bool(&key, value), [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:212:61 [INFO] [stdout] | [INFO] [stdout] 212 | EnvValue::Number(value) => evaluate_and_set_env(&key, &value.to_string()), [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:213:59 [INFO] [stdout] | [INFO] [stdout] 213 | EnvValue::List(ref value) => set_env_for_list(&key, value), [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:214:69 [INFO] [stdout] | [INFO] [stdout] 214 | EnvValue::Script(ref script_info) => set_env_for_script(&key, script_info), [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:215:74 [INFO] [stdout] | [INFO] [stdout] 215 | EnvValue::Decode(ref decode_info) => set_env_for_decode_info(&key, decode_info), [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:217:47 [INFO] [stdout] | [INFO] [stdout] 217 | set_env_for_conditional_value(&key, conditioned_value) [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:219:77 [INFO] [stdout] | [INFO] [stdout] 219 | EnvValue::PathGlob(ref path_glob_info) => set_env_for_path_glob(&key, path_glob_info), [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:222:41 [INFO] [stdout] | [INFO] [stdout] 222 | set_env_for_profile(&key, sub_env, additional_profiles) [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/environment/mod.rs:227:31 [INFO] [stdout] | [INFO] [stdout] 227 | unset_env(&key); [INFO] [stdout] | ^^^^ help: change this to: `key` [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 `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib/environment/mod.rs:239:21 [INFO] [stdout] | [INFO] [stdout] 239 | / match *env_value { [INFO] [stdout] 240 | | EnvValue::Profile(ref sub_env) => { [INFO] [stdout] 241 | | set_env_for_profile(&profile_name, sub_env, None) [INFO] [stdout] ... | [INFO] [stdout] 244 | | }; [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/lib/environment/mod.rs:238:22 [INFO] [stdout] | [INFO] [stdout] 237 | match env.get(&profile_name) { [INFO] [stdout] | ---------------------- use: `env.get(&profile_name).copied()` [INFO] [stdout] 238 | Some(ref env_value) => { [INFO] [stdout] | ^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 239 | match *env_value { [INFO] [stdout] 240 | EnvValue::Profile(ref sub_env) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/mod.rs:237:13 [INFO] [stdout] | [INFO] [stdout] 237 | / match env.get(&profile_name) { [INFO] [stdout] 238 | | Some(ref env_value) => { [INFO] [stdout] 239 | | match *env_value { [INFO] [stdout] 240 | | EnvValue::Profile(ref sub_env) => { [INFO] [stdout] ... | [INFO] [stdout] 246 | | None => (), [INFO] [stdout] 247 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 237 ~ if let Some(ref env_value) = env.get(&profile_name) { [INFO] [stdout] 238 + match *env_value { [INFO] [stdout] 239 + EnvValue::Profile(ref sub_env) => { [INFO] [stdout] 240 + set_env_for_profile(&profile_name, sub_env, None) [INFO] [stdout] 241 + } [INFO] [stdout] 242 + _ => (), [INFO] [stdout] 243 + }; [INFO] [stdout] 244 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/mod.rs:239:21 [INFO] [stdout] | [INFO] [stdout] 239 | / match *env_value { [INFO] [stdout] 240 | | EnvValue::Profile(ref sub_env) => { [INFO] [stdout] 241 | | set_env_for_profile(&profile_name, sub_env, None) [INFO] [stdout] ... | [INFO] [stdout] 244 | | }; [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 239 ~ if let EnvValue::Profile(ref sub_env) = *env_value { [INFO] [stdout] 240 + set_env_for_profile(&profile_name, sub_env, None) [INFO] [stdout] 241 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/lib/environment/mod.rs:238:22 [INFO] [stdout] | [INFO] [stdout] 238 | Some(ref env_value) => { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 238 ~ Some(env_value) => { [INFO] [stdout] 239 ~ match env_value { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/mod.rs:323:13 [INFO] [stdout] | [INFO] [stdout] 323 | / match *env_value { [INFO] [stdout] 324 | | EnvValue::Value(ref value) => evaluate_and_set_env(&key, value), [INFO] [stdout] 325 | | _ => (), [INFO] [stdout] 326 | | }; [INFO] [stdout] | |_____________^ help: try: `if let EnvValue::Value(ref value) = *env_value { evaluate_and_set_env(&key, value) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/environment/mod.rs:324:68 [INFO] [stdout] | [INFO] [stdout] 324 | EnvValue::Value(ref value) => evaluate_and_set_env(&key, value), [INFO] [stdout] | ^^^^ help: change this to: `key` [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::as_ref` [INFO] [stdout] --> src/lib/environment/mod.rs:335:31 [INFO] [stdout] | [INFO] [stdout] 335 | let additional_profiles = match config.config.additional_profiles { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 336 | | Some(ref profiles) => Some(profiles), [INFO] [stdout] 337 | | None => None, [INFO] [stdout] 338 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_as_ref [INFO] [stdout] = note: `#[warn(clippy::match_as_ref)]` on by default [INFO] [stdout] help: use `Option::as_ref()` directly [INFO] [stdout] | [INFO] [stdout] 335 - let additional_profiles = match config.config.additional_profiles { [INFO] [stdout] 336 - Some(ref profiles) => Some(profiles), [INFO] [stdout] 337 - None => None, [INFO] [stdout] 338 - }; [INFO] [stdout] 335 + let additional_profiles = config.config.additional_profiles.as_ref(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib/environment/mod.rs:386:24 [INFO] [stdout] | [INFO] [stdout] 386 | let is_workspace = !crate_info.workspace.is_none(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `crate_info.workspace.is_some()` [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: called `unwrap` on `package_info.name` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/environment/mod.rs:362:26 [INFO] [stdout] | [INFO] [stdout] 361 | if package_info.name.is_some() { [INFO] [stdout] | ------------------------------ help: try: `if let Some() = package_info.name` [INFO] [stdout] 362 | let crate_name = package_info.name.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: length comparison to zero [INFO] [stdout] --> src/lib/environment/mod.rs:380:35 [INFO] [stdout] | [INFO] [stdout] 380 | Some(ref dependencies) => dependencies.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!dependencies.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/environment/mod.rs:479:9 [INFO] [stdout] | [INFO] [stdout] 479 | &rustinfo.target_arch.unwrap_or("unknown".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `rustinfo.target_arch.unwrap_or("unknown".to_string())` [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/lib/environment/mod.rs:483:9 [INFO] [stdout] | [INFO] [stdout] 483 | &rustinfo.target_env.unwrap_or("unknown".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `rustinfo.target_env.unwrap_or("unknown".to_string())` [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/lib/environment/mod.rs:487:9 [INFO] [stdout] | [INFO] [stdout] 487 | &rustinfo.target_os.unwrap_or("unknown".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `rustinfo.target_os.unwrap_or("unknown".to_string())` [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/lib/environment/mod.rs:491:9 [INFO] [stdout] | [INFO] [stdout] 491 | / &rustinfo [INFO] [stdout] 492 | | .target_pointer_width [INFO] [stdout] 493 | | .unwrap_or("unknown".to_string()), [INFO] [stdout] | |_____________________________________________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 491 ~ rustinfo [INFO] [stdout] 492 + .target_pointer_width [INFO] [stdout] 493 ~ .unwrap_or("unknown".to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/environment/mod.rs:497:9 [INFO] [stdout] | [INFO] [stdout] 497 | &rustinfo.target_vendor.unwrap_or("unknown".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `rustinfo.target_vendor.unwrap_or("unknown".to_string())` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/environment/mod.rs:521:21 [INFO] [stdout] | [INFO] [stdout] 521 | Ok(path) => match path.file_name() { [INFO] [stdout] | _____________________^ [INFO] [stdout] 522 | | Some(name) => Some(name.to_string_lossy().into_owned()), [INFO] [stdout] 523 | | None => None, [INFO] [stdout] 524 | | }, [INFO] [stdout] | |_________^ help: try: `path.file_name().map(|name| name.to_string_lossy().into_owned())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/environment/mod.rs:544:25 [INFO] [stdout] | [INFO] [stdout] 544 | None => match project_name { [INFO] [stdout] | _________________________^ [INFO] [stdout] 545 | | Some(name) => Some(name), [INFO] [stdout] 546 | | None => None, [INFO] [stdout] 547 | | }, [INFO] [stdout] | |_________________^ help: try: `project_name.map(|name| name)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/environment/mod.rs:587:36 [INFO] [stdout] | [INFO] [stdout] 587 | envmnt::set("CARGO_MAKE_TASK", &task); [INFO] [stdout] | ^^^^^ help: change this to: `task` [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: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/environment/mod.rs:591:26 [INFO] [stdout] | [INFO] [stdout] 591 | let task_arguments = match cli_args.arguments.clone() { [INFO] [stdout] | __________________________^ [INFO] [stdout] 592 | | Some(args) => args, [INFO] [stdout] 593 | | None => vec![], [INFO] [stdout] 594 | | }; [INFO] [stdout] | |_____^ help: replace it with: `cli_args.arguments.clone().unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/mod.rs:664:5 [INFO] [stdout] | [INFO] [stdout] 664 | / match crateinfo::search_workspace_root() { [INFO] [stdout] 665 | | Some(root_directory) => { [INFO] [stdout] 666 | | let root_directory_path_buf = get_directory_path(Some(&root_directory)); [INFO] [stdout] 667 | | let root_directory_path = root_directory_path_buf.as_path(); [INFO] [stdout] ... | [INFO] [stdout] 670 | | None => (), [INFO] [stdout] 671 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 664 ~ if let Some(root_directory) = crateinfo::search_workspace_root() { [INFO] [stdout] 665 + let root_directory_path_buf = get_directory_path(Some(&root_directory)); [INFO] [stdout] 666 + let root_directory_path = root_directory_path_buf.as_path(); [INFO] [stdout] 667 + set_workspace_cwd(&root_directory_path, true); [INFO] [stdout] 668 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/environment/mod.rs:668:31 [INFO] [stdout] | [INFO] [stdout] 668 | set_workspace_cwd(&root_directory_path, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `root_directory_path` [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/lib/environment/mod.rs:691:32 [INFO] [stdout] | [INFO] [stdout] 691 | match env::set_current_dir(&directory_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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/lib/environment/mod.rs:701:57 [INFO] [stdout] | [INFO] [stdout] 701 | envmnt::set("CARGO_MAKE_WORKING_DIRECTORY", &directory_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/environment/mod.rs:703:31 [INFO] [stdout] | [INFO] [stdout] 703 | set_workspace_cwd(&directory_path, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/lib/environment/mod.rs:782:29 [INFO] [stdout] | [INFO] [stdout] 782 | fn current_dir_or(fallback: &PathBuf) -> PathBuf { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 782 ~ fn current_dir_or(fallback: &Path) -> PathBuf { [INFO] [stdout] 783 | match env::current_dir() { [INFO] [stdout] 784 | Ok(value) => value.clone(), [INFO] [stdout] 785 ~ _ => fallback.to_path_buf(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/environment/mod.rs:799:9 [INFO] [stdout] | [INFO] [stdout] 799 | / match from_dir.to_str() { [INFO] [stdout] 800 | | Some(directory_string) => Some(directory_string.to_string()), [INFO] [stdout] 801 | | _ => None, [INFO] [stdout] 802 | | } [INFO] [stdout] | |_________^ help: try: `from_dir.to_str().map(|directory_string| directory_string.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/environment/mod.rs:824:9 [INFO] [stdout] | [INFO] [stdout] 824 | / match from_dir.to_str() { [INFO] [stdout] 825 | | Some(directory_string) => Some(directory_string.to_string()), [INFO] [stdout] 826 | | _ => None, [INFO] [stdout] 827 | | } [INFO] [stdout] | |_________^ help: try: `from_dir.to_str().map(|directory_string| directory_string.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `index` is only used to index `args` [INFO] [stdout] --> src/lib/environment/mod.rs:849:26 [INFO] [stdout] | [INFO] [stdout] 849 | for index in 0..args.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] 849 - for index in 0..args.len() { [INFO] [stdout] 849 + for in &args { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/environment/mod.rs:867:29 [INFO] [stdout] | [INFO] [stdout] 867 | let task_args = match envmnt::get_list("CARGO_MAKE_TASK_ARGS") { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 868 | | Some(list) => list, [INFO] [stdout] 869 | | None => vec![], [INFO] [stdout] 870 | | }; [INFO] [stdout] | |_____________^ help: replace it with: `envmnt::get_list("CARGO_MAKE_TASK_ARGS").unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `index` is only used to index `args` [INFO] [stdout] --> src/lib/environment/mod.rs:872:26 [INFO] [stdout] | [INFO] [stdout] 872 | for index in 0..args.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 872 - for index in 0..args.len() { [INFO] [stdout] 872 + for in &args { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/environment/mod.rs:874:24 [INFO] [stdout] | [INFO] [stdout] 874 | if task_args.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!task_args.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: the loop variable `arg_index` is only used to index `task_args` [INFO] [stdout] --> src/lib/environment/mod.rs:876:46 [INFO] [stdout] | [INFO] [stdout] 876 | ... for arg_index in 0..task_args.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 876 - for arg_index in 0..task_args.len() { [INFO] [stdout] 876 + for in &task_args { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `arg_index` is only used to index `task_args` [INFO] [stdout] --> src/lib/environment/mod.rs:880:46 [INFO] [stdout] | [INFO] [stdout] 880 | ... for arg_index in 0..task_args.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 880 - for arg_index in 0..task_args.len() { [INFO] [stdout] 880 + for in &task_args { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `index` is only used to index `expanded_args` [INFO] [stdout] --> src/lib/environment/mod.rs:892:26 [INFO] [stdout] | [INFO] [stdout] 892 | for index in 0..expanded_args.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 892 - for index in 0..expanded_args.len() { [INFO] [stdout] 892 + for in &mut expanded_args { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/mod.rs:909:5 [INFO] [stdout] | [INFO] [stdout] 909 | / match config.command { [INFO] [stdout] 910 | | Some(value) => { [INFO] [stdout] 911 | | config.command = Some(expand_value(&value)); [INFO] [stdout] ... | [INFO] [stdout] 914 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 909 ~ if let Some(value) = config.command { [INFO] [stdout] 910 + config.command = Some(expand_value(&value)); [INFO] [stdout] 911 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `eprintln!` args [INFO] [stdout] --> src/lib/error.rs:173:38 [INFO] [stdout] | [INFO] [stdout] 173 | eprintln!("{}", e.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `eprintln!` args [INFO] [stdout] --> src/lib/error.rs:178:40 [INFO] [stdout] | [INFO] [stdout] 178 | eprintln!("{}", err.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib/execution_plan.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | return Err(CargoMakeError::AliasCycle(name.to_string(), chain)); [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] 42 - return Err(CargoMakeError::AliasCycle(name.to_string(), chain)); [INFO] [stdout] 42 + Err(CargoMakeError::AliasCycle(name.to_string(), chain)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/execution_plan.rs:133:12 [INFO] [stdout] | [INFO] [stdout] 133 | if member.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!member.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/execution_plan.rs:151:52 [INFO] [stdout] | [INFO] [stdout] 151 | Ok(pattern) => pattern.matches(&member), [INFO] [stdout] | ^^^^^^^ help: change this to: `member` [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/lib/execution_plan.rs:186:42 [INFO] [stdout] | [INFO] [stdout] 186 | if !should_skip_workspace_member(&member, &skip_members) [INFO] [stdout] | ^^^^^^^ help: change this to: `member` [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/lib/execution_plan.rs:187:48 [INFO] [stdout] | [INFO] [stdout] 187 | && should_include_workspace_member(&member, &include_members) [INFO] [stdout] | ^^^^^^^ help: change this to: `member` [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/lib/execution_plan.rs:244:32 [INFO] [stdout] | [INFO] [stdout] 244 | make_line.push_str(&cargo_make_command); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `cargo_make_command` [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/lib/execution_plan.rs:253:32 [INFO] [stdout] | [INFO] [stdout] 253 | make_line.push_str(&task); [INFO] [stdout] | ^^^^^ help: change this to: `task` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/execution_plan.rs:257:21 [INFO] [stdout] | [INFO] [stdout] 257 | make_line.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `make_line.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib/execution_plan.rs:422:9 [INFO] [stdout] | [INFO] [stdout] 422 | return Err(CargoMakeError::TaskIs(format!("{}", task), "private")); [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] 422 - return Err(CargoMakeError::TaskIs(format!("{}", task), "private")); [INFO] [stdout] 422 + Err(CargoMakeError::TaskIs(format!("{}", task), "private")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/execution_plan.rs:383:22 [INFO] [stdout] | [INFO] [stdout] 383 | let is_private = match task_config.private { [INFO] [stdout] | ______________________^ [INFO] [stdout] 384 | | Some(value) => value, [INFO] [stdout] 385 | | None => false, [INFO] [stdout] 386 | | }; [INFO] [stdout] | |_____^ help: ascribe the type bool and replace your expression with: `task_config.private.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/execution_plan.rs:396:29 [INFO] [stdout] | [INFO] [stdout] 396 | ... &config, [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/lib/execution_plan.rs:512:35 [INFO] [stdout] | [INFO] [stdout] 512 | is_workspace_flow(&config, &task, disable_workspace, &crate_info, sub_flow); [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/lib/execution_plan.rs:512:44 [INFO] [stdout] | [INFO] [stdout] 512 | is_workspace_flow(&config, &task, disable_workspace, &crate_info, sub_flow); [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/execution_plan.rs:512:70 [INFO] [stdout] | [INFO] [stdout] 512 | is_workspace_flow(&config, &task, disable_workspace, &crate_info, sub_flow); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `crate_info` [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/lib/execution_plan.rs:523:21 [INFO] [stdout] | [INFO] [stdout] 523 | &config, [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/lib/functions/decode_func.rs:14:37 [INFO] [stdout] | [INFO] [stdout] 14 | pub(crate) fn invoke(function_args: &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] 14 - pub(crate) fn invoke(function_args: &Vec) -> Vec { [INFO] [stdout] 14 + pub(crate) fn invoke(function_args: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/functions/decode_func.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | if function_args.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `function_args.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: this creates an owned instance just for comparison [INFO] [stdout] --> src/lib/functions/decode_func.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 31 | } else if item.to_string() == env_value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `*item` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/lib/functions/decode_func.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | if function_args.len() % 2 == 0 && function_args.len() > 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `function_args.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/functions/decode_func.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | if output_value.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!output_value.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/functions/getat_func.rs:10:37 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) fn invoke(function_args: &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] 10 - pub(crate) fn invoke(function_args: &Vec) -> Vec { [INFO] [stdout] 10 + pub(crate) fn invoke(function_args: &[String]) -> Vec { [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/lib/functions/remove_empty_func.rs:10:37 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) fn invoke(function_args: &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] 10 - pub(crate) fn invoke(function_args: &Vec) -> Vec { [INFO] [stdout] 10 + pub(crate) fn invoke(function_args: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/functions/remove_empty_func.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | if value.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/functions/split_func.rs:10:37 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) fn invoke(function_args: &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] 10 - pub(crate) fn invoke(function_args: &Vec) -> Vec { [INFO] [stdout] 10 + pub(crate) fn invoke(function_args: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/lib/functions/split_func.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | if args_count < 2 || args_count > 3 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(2..=3).contains(&args_count)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/functions/split_func.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | if value.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value.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: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lib/functions/split_func.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | / if remove_empty && string_value.is_empty() { [INFO] [stdout] 40 | | false [INFO] [stdout] 41 | | } else { [INFO] [stdout] 42 | | true [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________________^ help: you can reduce it to: `!(remove_empty && string_value.is_empty())` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/functions/trim_func.rs:13:37 [INFO] [stdout] | [INFO] [stdout] 13 | pub(crate) fn invoke(function_args: &Vec) -> Result, CargoMakeError> { [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] 13 - pub(crate) fn invoke(function_args: &Vec) -> Result, CargoMakeError> { [INFO] [stdout] 13 + pub(crate) fn invoke(function_args: &[String]) -> Result, CargoMakeError> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/functions/trim_func.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | if trimmed_value.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!trimmed_value.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: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/functions/mod.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | / match function_string.find('(') { [INFO] [stdout] 46 | | Some(index) => Some(function_string[0..index].to_string()), [INFO] [stdout] 47 | | None => None, [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____^ help: try: `function_string.find('(').map(|index| function_string[0..index].to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/functions/mod.rs:65:28 [INFO] [stdout] | [INFO] [stdout] 65 | let arguments = if args_string.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args_string.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/functions/mod.rs:68:56 [INFO] [stdout] | [INFO] [stdout] 68 | .map(|str_value| get_function_argument(&str_value)) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `str_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: the loop variable `index` is only used to index `args` [INFO] [stdout] --> src/lib/functions/mod.rs:109:26 [INFO] [stdout] | [INFO] [stdout] 109 | for index in 0..args.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 109 - for index in 0..args.len() { [INFO] [stdout] 109 + for in &args { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `result_index` is only used to index `result_args` [INFO] [stdout] --> src/lib/functions/mod.rs:112:37 [INFO] [stdout] | [INFO] [stdout] 112 | for result_index in 0..result_args.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 112 - for result_index in 0..result_args.len() { [INFO] [stdout] 112 + for in &result_args { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/installer/cargo_plugin_installer.rs:89:40 [INFO] [stdout] | [INFO] [stdout] 89 | Ok(is_crate_in_list_output(&crate_name_trimmed, &stdout) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `crate_name_trimmed` [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/lib/installer/cargo_plugin_installer.rs:90:51 [INFO] [stdout] | [INFO] [stdout] 90 | || is_crate_in_list_output_legacy(&crate_name_trimmed, &stdout)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `crate_name_trimmed` [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/lib/installer/cargo_plugin_installer.rs:135:50 [INFO] [stdout] | [INFO] [stdout] 135 | let skip_crate_name = should_skip_crate_name(&args); [INFO] [stdout] | ^^^^^ help: change this to: `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 function has too many arguments (8/7) [INFO] [stdout] --> src/lib/installer/cargo_plugin_installer.rs:152:1 [INFO] [stdout] | [INFO] [stdout] 152 | / pub(crate) fn install_crate( [INFO] [stdout] 153 | | toolchain: &Option, [INFO] [stdout] 154 | | cargo_command: Option<&str>, [INFO] [stdout] 155 | | crate_name: &str, [INFO] [stdout] ... | [INFO] [stdout] 160 | | allow_force: &Option, [INFO] [stdout] 161 | | ) -> Result<(), CargoMakeError> { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/installer/cargo_plugin_installer.rs:163:51 [INFO] [stdout] | [INFO] [stdout] 163 | Some(cargo_command) => is_crate_installed(&toolchain, cargo_command), [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `toolchain` [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/lib/installer/cargo_plugin_installer.rs:173:62 [INFO] [stdout] | [INFO] [stdout] 173 | if crate_version_check::is_min_version_valid(&crate_name, version, None) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `crate_name` [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/lib/installer/cargo_plugin_installer.rs:188:61 [INFO] [stdout] | [INFO] [stdout] 188 | get_install_crate_args(crate_name, force, args, &min_version, install_command); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `min_version` [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/lib/installer/cargo_plugin_installer.rs:192:49 [INFO] [stdout] | [INFO] [stdout] 192 | let command_spec = wrap_command(&toolchain_string, "cargo", &Some(install_args)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `toolchain_string` [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/lib/installer/crate_installer.rs:25:63 [INFO] [stdout] | [INFO] [stdout] 25 | rustup_component_installer::invoke_rustup_install(&toolchain, &rustup_component_info) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `toolchain` [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/lib/installer/crate_installer.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | &args, [INFO] [stdout] | ^^^^^ help: change this to: `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: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/installer/crate_installer.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | / match info.rustup_component_name { [INFO] [stdout] 78 | | Some(_) => false, [INFO] [stdout] 79 | | None => true, [INFO] [stdout] 80 | | } [INFO] [stdout] | |_____^ help: try: `info.rustup_component_name.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/installer/crate_installer.rs:90:50 [INFO] [stdout] | [INFO] [stdout] 90 | rustup_component_installer::is_installed(&toolchain, &info.binary, &info.test_arg); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `toolchain` [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/lib/installer/crate_installer.rs:91:46 [INFO] [stdout] | [INFO] [stdout] 91 | let crate_only_info = is_crate_only_info(&info); [INFO] [stdout] | ^^^^^ help: change this to: `info` [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/lib/installer/crate_installer.rs:117:35 [INFO] [stdout] | [INFO] [stdout] 117 | if !invoke_rustup_install(&toolchain, &info) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `toolchain` [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/lib/installer/crate_installer.rs:117:47 [INFO] [stdout] | [INFO] [stdout] 117 | if !invoke_rustup_install(&toolchain, &info) { [INFO] [stdout] | ^^^^^ help: change this to: `info` [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/lib/installer/crate_installer.rs:118:34 [INFO] [stdout] | [INFO] [stdout] 118 | invoke_cargo_install(&toolchain, &info, &args, validate)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `toolchain` [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/lib/installer/crate_installer.rs:118:46 [INFO] [stdout] | [INFO] [stdout] 118 | invoke_cargo_install(&toolchain, &info, &args, validate)?; [INFO] [stdout] | ^^^^^ help: change this to: `info` [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/lib/installer/crate_installer.rs:118:53 [INFO] [stdout] | [INFO] [stdout] 118 | invoke_cargo_install(&toolchain, &info, &args, validate)?; [INFO] [stdout] | ^^^^^ help: change this to: `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: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/installer/crate_version_check.rs:31:32 [INFO] [stdout] | [INFO] [stdout] 31 | Some(directory) => match directory.join(".cargo").to_str() { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 32 | | Some(value) => Some(value.to_string()), [INFO] [stdout] 33 | | None => None, [INFO] [stdout] 34 | | }, [INFO] [stdout] | |_____________^ help: try: `directory.join(".cargo").to_str().map(|value| value.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/installer/crate_version_check.rs:91:56 [INFO] [stdout] | [INFO] [stdout] 91 | let output = parse_version_from_string(&key, crate_name); [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/installer/crate_version_check.rs:110:55 [INFO] [stdout] | [INFO] [stdout] 110 | Some(info) => get_crate_version_from_info(&crate_name, &info), [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `crate_name` [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/lib/installer/crate_version_check.rs:133:21 [INFO] [stdout] | [INFO] [stdout] 133 | &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 if-then-else expression returns a bool literal [INFO] [stdout] --> src/lib/installer/rustup_component_installer.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | / if exit_code != 0 { [INFO] [stdout] 43 | | false [INFO] [stdout] 44 | | } else { [INFO] [stdout] 45 | | true [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `exit_code == 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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/installer/rustup_component_installer.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | / match toolchain { [INFO] [stdout] 67 | | Some(ref toolchain) => { [INFO] [stdout] 68 | | let channel = get_channel(toolchain); [INFO] [stdout] ... | [INFO] [stdout] 73 | | None => {} [INFO] [stdout] 74 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 66 ~ if let Some(ref toolchain) = toolchain { [INFO] [stdout] 67 + let channel = get_channel(toolchain); [INFO] [stdout] 68 + [INFO] [stdout] 69 + command_spec.arg("--toolchain"); [INFO] [stdout] 70 + command_spec.arg(&channel); [INFO] [stdout] 71 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/installer/rustup_component_installer.rs:115:48 [INFO] [stdout] | [INFO] [stdout] 115 | Some(ref test_arg) => is_installed(&toolchain, binary, test_arg), [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `toolchain` [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/lib/installer/rustup_component_installer.rs:127:43 [INFO] [stdout] | [INFO] [stdout] 127 | installed = invoke_rustup_install(&toolchain, &info); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `toolchain` [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/lib/installer/rustup_component_installer.rs:127:55 [INFO] [stdout] | [INFO] [stdout] 127 | installed = invoke_rustup_install(&toolchain, &info); [INFO] [stdout] | ^^^^^ help: change this to: `info` [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: length comparison to zero [INFO] [stdout] --> src/lib/installer/mod.rs:30:28 [INFO] [stdout] | [INFO] [stdout] 30 | if args.len() > 0 && !args[0].starts_with("-") { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.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: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/lib/installer/mod.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | / if let InstallCrate::Enabled(enabled) = install_crate_value { [INFO] [stdout] 81 | | if *enabled { [INFO] [stdout] 82 | | // enabled true is the same as no install_crate defined [INFO] [stdout] 83 | | install_crate = None; [INFO] [stdout] 84 | | } [INFO] [stdout] 85 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/lib/installer/mod.rs:79:17 [INFO] [stdout] | [INFO] [stdout] 79 | if let Some(ref install_crate_value) = install_crate { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 80 | if let InstallCrate::Enabled(enabled) = install_crate_value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/installer/mod.rs:118:62 [INFO] [stdout] | [INFO] [stdout] 118 | match get_cargo_plugin_info_from_command(&task_config) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `task_config` [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/lib/installer/mod.rs:168:21 [INFO] [stdout] | [INFO] [stdout] 168 | &script, [INFO] [stdout] | ^^^^^^^ help: change this to: `script` [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/lib/installer/mod.rs:178:62 [INFO] [stdout] | [INFO] [stdout] 178 | None => match get_cargo_plugin_info_from_command(&task_config) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `task_config` [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: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/lib/io.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | / match fsio::file::write_text_file(file_path, text) { [INFO] [stdout] 57 | | Ok(_) => true, [INFO] [stdout] 58 | | Err(_) => false, [INFO] [stdout] 59 | | } [INFO] [stdout] | |_____^ help: try: `fsio::file::write_text_file(file_path, text).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/io.rs:124:84 [INFO] [stdout] | [INFO] [stdout] 124 | ... let mut value_string: String = FromPath::from_path(&path.path()); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `path.path()` [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/lib/legacy.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / match dirs_next::home_dir() { [INFO] [stdout] 16 | | Some(directory) => Some(directory.join(".cargo-make")), [INFO] [stdout] 17 | | None => None, [INFO] [stdout] 18 | | } [INFO] [stdout] | |_____^ help: try: `dirs_next::home_dir().map(|directory| directory.join(".cargo-make"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/legacy.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | / match fsio::directory::create(&target_directory) { [INFO] [stdout] 40 | | Ok(_) => true, [INFO] [stdout] 41 | | _ => false, [INFO] [stdout] 42 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 39 - match fsio::directory::create(&target_directory) { [INFO] [stdout] 40 - Ok(_) => true, [INFO] [stdout] 41 - _ => false, [INFO] [stdout] 42 - } [INFO] [stdout] 39 + matches!(fsio::directory::create(&target_directory), Ok(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/lib/legacy.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | / match fsio::directory::create(&target_directory) { [INFO] [stdout] 40 | | Ok(_) => true, [INFO] [stdout] 41 | | _ => false, [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____________^ help: try: `fsio::directory::create(&target_directory).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/legacy.rs:82:69 [INFO] [stdout] | [INFO] [stdout] 82 | Some(directory) => migrate_from_directory(target_directory, &file, &directory), [INFO] [stdout] | ^^^^^ help: change this to: `file` [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: name `VERBOSE` contains a capitalized acronym [INFO] [stdout] --> src/lib/logger.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | VERBOSE, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Verbose` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INFO` contains a capitalized acronym [INFO] [stdout] --> src/lib/logger.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | INFO, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Info` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ERROR` contains a capitalized acronym [INFO] [stdout] --> src/lib/logger.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | ERROR, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OFF` contains a capitalized acronym [INFO] [stdout] --> src/lib/logger.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | OFF, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Off` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/logger.rs:89:45 [INFO] [stdout] | [INFO] [stdout] 89 | let mut level_name = get_name_for_level(&level); [INFO] [stdout] | ^^^^^^ help: change this to: `level` [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 `if` statement can be collapsed [INFO] [stdout] --> src/lib/logger.rs:149:13 [INFO] [stdout] | [INFO] [stdout] 149 | / if cfg!(test) { [INFO] [stdout] 150 | | if record_level == LevelFilter::Error { [INFO] [stdout] 151 | | panic!("test error flow: {}", message); [INFO] [stdout] 152 | | } [INFO] [stdout] 153 | | } [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] 149 ~ if cfg!(test) [INFO] [stdout] 150 ~ && record_level == LevelFilter::Error { [INFO] [stdout] 151 | panic!("test error flow: {}", message); [INFO] [stdout] 152 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/plugin/runner.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | / match plugins_config.plugins.get(&normalized_plugin_name) { [INFO] [stdout] 55 | | Some(plugin) => Some((normalized_plugin_name, plugin.clone())), [INFO] [stdout] 56 | | None => None, [INFO] [stdout] 57 | | } [INFO] [stdout] | |_____________^ help: try: `plugins_config.plugins.get(&normalized_plugin_name).map(|plugin| (normalized_plugin_name, plugin.clone()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/plugin/runner.rs:283:21 [INFO] [stdout] | [INFO] [stdout] 283 | None => match step.config.plugin { [INFO] [stdout] | _____________________^ [INFO] [stdout] 284 | | Some(ref value) => Some(value.clone()), [INFO] [stdout] 285 | | None => None, [INFO] [stdout] 286 | | }, [INFO] [stdout] | |_____________^ help: try: `step.config.plugin.as_ref().map(|value| value.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/profile.rs:24:52 [INFO] [stdout] | [INFO] [stdout] 24 | let profile_normalized = normalize_profile(&profile); [INFO] [stdout] | ^^^^^^^^ help: change this to: `profile` [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: length comparison to zero [INFO] [stdout] --> src/lib/profile.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | if profile_normalized.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!profile_normalized.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/profile.rs:43:52 [INFO] [stdout] | [INFO] [stdout] 43 | let mut profile_normalized = normalize_profile(&profile); [INFO] [stdout] | ^^^^^^^^ help: change this to: `profile` [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: length comparison to zero [INFO] [stdout] --> src/lib/profile.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | if profile_normalized.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `profile_normalized.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/profile.rs:55:61 [INFO] [stdout] | [INFO] [stdout] 55 | let nomralized_profiles = normalize_additional_profiles(&profiles); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `profiles` [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 `ok` [INFO] [stdout] --> src/lib/proxy_task.rs:48:17 [INFO] [stdout] | [INFO] [stdout] 48 | None => match env::var("CARGO_MAKE_MAKEFILE_PATH") { [INFO] [stdout] | _________________^ [INFO] [stdout] 49 | | Ok(makefile_path) => Some(makefile_path), [INFO] [stdout] 50 | | _ => None, [INFO] [stdout] 51 | | }, [INFO] [stdout] | |_________^ help: replace with: `env::var("CARGO_MAKE_MAKEFILE_PATH").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/proxy_task.rs:54:12 [INFO] [stdout] | [INFO] [stdout] 54 | if makefile_path.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!makefile_path.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: length comparison to zero [INFO] [stdout] --> src/lib/runner.rs:50:16 [INFO] [stdout] | [INFO] [stdout] 50 | if expanded_cwd.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!expanded_cwd.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/runner.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | / match step.config.cwd { [INFO] [stdout] 67 | | Some(_) => { [INFO] [stdout] 68 | | environment::setup_cwd(Some(&revert_directory)); [INFO] [stdout] ... | [INFO] [stdout] 71 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 66 ~ if let Some(_) = step.config.cwd { [INFO] [stdout] 67 + environment::setup_cwd(Some(&revert_directory)); [INFO] [stdout] 68 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/runner.rs:82:56 [INFO] [stdout] | [INFO] [stdout] 82 | valid = condition::validate_condition_for_step(&flow_info, &step)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:82:68 [INFO] [stdout] | [INFO] [stdout] 82 | valid = condition::validate_condition_for_step(&flow_info, &step)?; [INFO] [stdout] | ^^^^^ help: change this to: `step` [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/lib/runner.rs:86:34 [INFO] [stdout] | [INFO] [stdout] 86 | do_in_task_working_directory(&step, do_validate)?; [INFO] [stdout] | ^^^^^ help: change this to: `step` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib/runner.rs:94:6 [INFO] [stdout] | [INFO] [stdout] 94 | ) -> Result<(Option>, bool, bool, Option), CargoMakeError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/runner.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | &flow_info, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | &flow_info, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:167:33 [INFO] [stdout] | [INFO] [stdout] 167 | let step = create_fork_step(&flow_info); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:176:34 [INFO] [stdout] | [INFO] [stdout] 176 | run_cleanup_task(&flow_info, flow_state, &cleanup_task_name)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:176:58 [INFO] [stdout] | [INFO] [stdout] 176 | run_cleanup_task(&flow_info, flow_state, &cleanup_task_name)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `cleanup_task_name` [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/lib/runner.rs:182:26 [INFO] [stdout] | [INFO] [stdout] 182 | None => run_task(&flow_info, flow_state, &step), [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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: called `unwrap` on `task_names` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/runner.rs:212:21 [INFO] [stdout] | [INFO] [stdout] 211 | if task_names.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = task_names` [INFO] [stdout] 212 | let names = task_names.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/runner.rs:207:48 [INFO] [stdout] | [INFO] [stdout] 207 | get_sub_task_info_for_routing_info(&flow_info, routing_info)? [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:250:29 [INFO] [stdout] | [INFO] [stdout] 250 | task_run_fn(&flow_info, flow_state.clone(), fork, &cleanup_task)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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: length comparison to zero [INFO] [stdout] --> src/lib/runner.rs:254:12 [INFO] [stdout] | [INFO] [stdout] 254 | if threads.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!threads.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/runner.rs:261:30 [INFO] [stdout] | [INFO] [stdout] 261 | run_cleanup_task(&flow_info, flow_state, &cleanup_task_name)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:275:29 [INFO] [stdout] | [INFO] [stdout] 275 | run_sub_task_and_report(&flow_info, flow_state, &sub_task) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:275:53 [INFO] [stdout] | [INFO] [stdout] 275 | run_sub_task_and_report(&flow_info, flow_state, &sub_task) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `sub_task` [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/lib/runner.rs:280:30 [INFO] [stdout] | [INFO] [stdout] 280 | watch_task_name.push_str(&task); [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/runner.rs:287:40 [INFO] [stdout] | [INFO] [stdout] 287 | let watch_task = create_watch_task(&task, options, flow_info); [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/runner.rs:289:50 [INFO] [stdout] | [INFO] [stdout] 289 | let watch_task_name = create_watch_task_name(&task); [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/runner.rs:303:34 [INFO] [stdout] | [INFO] [stdout] 303 | let step = create_watch_step(&task, options, flow_info); [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/runner.rs:305:14 [INFO] [stdout] | [INFO] [stdout] 305 | run_task(&flow_info, flow_state, &step) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/runner.rs:359:9 [INFO] [stdout] | [INFO] [stdout] 359 | / match step.config.env { [INFO] [stdout] 360 | | Some(ref env) => environment::set_current_task_meta_info_env(env.clone()), [INFO] [stdout] 361 | | None => (), [INFO] [stdout] 362 | | }; [INFO] [stdout] | |_________^ help: try: `if let Some(ref env) = step.config.env { environment::set_current_task_meta_info_env(env.clone()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/runner.rs:366:13 [INFO] [stdout] | [INFO] [stdout] 366 | &flow_info, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:367:68 [INFO] [stdout] | [INFO] [stdout] 367 | &environment::expand_condition_script_runner_arguments(&step), [INFO] [stdout] | ^^^^^ help: change this to: `step` [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/lib/runner.rs:369:45 [INFO] [stdout] | [INFO] [stdout] 369 | if logger::should_reduce_output(&flow_info) && step.config.script.is_none() { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/runner.rs:383:13 [INFO] [stdout] | [INFO] [stdout] 383 | / match deprecated_info { [INFO] [stdout] 384 | | Some(deprecated) => match deprecated { [INFO] [stdout] 385 | | DeprecationInfo::Boolean(value) => { [INFO] [stdout] 386 | | if value { [INFO] [stdout] ... | [INFO] [stdout] 398 | | None => (), [INFO] [stdout] 399 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 383 ~ if let Some(deprecated) = deprecated_info { match deprecated { [INFO] [stdout] 384 + DeprecationInfo::Boolean(value) => { [INFO] [stdout] 385 + if value { [INFO] [stdout] 386 + warn!("Task: {} is deprecated.", &step.name); [INFO] [stdout] 387 + } [INFO] [stdout] 388 + [INFO] [stdout] 389 + () [INFO] [stdout] 390 + } [INFO] [stdout] 391 + DeprecationInfo::Message(ref message) => { [INFO] [stdout] 392 + warn!("Task: {} is deprecated - {}", &step.name, message); [INFO] [stdout] 393 + [INFO] [stdout] 394 + () [INFO] [stdout] 395 + } [INFO] [stdout] 396 ~ } }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/runner.rs:404:13 [INFO] [stdout] | [INFO] [stdout] 404 | / match step.config.env_files { [INFO] [stdout] 405 | | Some(ref env_files) => environment::set_env_files(env_files.clone()), [INFO] [stdout] 406 | | None => (), [INFO] [stdout] 407 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Some(ref env_files) = step.config.env_files { environment::set_env_files(env_files.clone()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/runner.rs:408:13 [INFO] [stdout] | [INFO] [stdout] 408 | / match step.config.env { [INFO] [stdout] 409 | | Some(ref env) => environment::set_env(env.clone()), [INFO] [stdout] 410 | | None => (), [INFO] [stdout] 411 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Some(ref env) = step.config.env { environment::set_env(env.clone()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/runner.rs:417:51 [INFO] [stdout] | [INFO] [stdout] 417 | let mut updated_step = functions::run(&step)?; [INFO] [stdout] | ^^^^^ help: change this to: `step` [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/lib/runner.rs:424:21 [INFO] [stdout] | [INFO] [stdout] 424 | &flow_info, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:430:46 [INFO] [stdout] | [INFO] [stdout] 430 | do_in_task_working_directory(&step, || -> Result { [INFO] [stdout] | ^^^^^ help: change this to: `step` [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/lib/runner.rs:443:38 [INFO] [stdout] | [INFO] [stdout] 443 | run_sub_task(&flow_info, flow_state, sub_task)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:446:54 [INFO] [stdout] | [INFO] [stdout] 446 | do_in_task_working_directory(&step, || -> Result { [INFO] [stdout] | ^^^^^ help: change this to: `step` [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/lib/runner.rs:478:45 [INFO] [stdout] | [INFO] [stdout] 478 | if logger::should_reduce_output(&flow_info) && !step.config.is_actionable() { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:497:18 [INFO] [stdout] | [INFO] [stdout] 497 | run_task(&flow_info, flow_state.clone(), &step)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/runner.rs:497:50 [INFO] [stdout] | [INFO] [stdout] 497 | run_task(&flow_info, flow_state.clone(), &step)?; [INFO] [stdout] | ^^^^^ help: change this to: `step` [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/lib/runner.rs:504:27 [INFO] [stdout] | [INFO] [stdout] 504 | create_proxy_task(&task, true, true, None, flow_info.cli_arguments.clone()); [INFO] [stdout] | ^^^^^ help: change this to: `task` [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: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/lib/runner.rs:506:39 [INFO] [stdout] | [INFO] [stdout] 506 | let mut env_map = task_config.env.unwrap_or(IndexMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/runner.rs:517:13 [INFO] [stdout] | [INFO] [stdout] 517 | make_command.push_str("\""); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `make_command.push('"')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/runner.rs:519:13 [INFO] [stdout] | [INFO] [stdout] 519 | make_command.push_str("\""); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `make_command.push('"')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib/runner.rs:531:37 [INFO] [stdout] | [INFO] [stdout] 531 | Some(task_watch_options) => match task_watch_options { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 532 | | TaskWatchOptions::Options(watch_options) => { [INFO] [stdout] 533 | | let watch_version = match watch_options.version { [INFO] [stdout] 534 | | Some(value) => value.to_string(), [INFO] [stdout] ... | [INFO] [stdout] 584 | | _ => watch_args.push("-q".to_string()), [INFO] [stdout] 585 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/lib/runner.rs:531:14 [INFO] [stdout] | [INFO] [stdout] 531 | Some(task_watch_options) => match task_watch_options { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 532 | TaskWatchOptions::Options(watch_options) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/runner.rs:575:17 [INFO] [stdout] | [INFO] [stdout] 575 | / match watch_options.watch { [INFO] [stdout] 576 | | Some(paths) => { [INFO] [stdout] 577 | | for watch_path in paths { [INFO] [stdout] 578 | | watch_args.extend_from_slice(&["-w".to_string(), watch_path]) [INFO] [stdout] ... | [INFO] [stdout] 581 | | _ => (), [INFO] [stdout] 582 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 575 ~ if let Some(paths) = watch_options.watch { [INFO] [stdout] 576 + for watch_path in paths { [INFO] [stdout] 577 + watch_args.extend_from_slice(&["-w".to_string(), watch_path]) [INFO] [stdout] 578 + } [INFO] [stdout] 579 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/runner.rs:615:19 [INFO] [stdout] | [INFO] [stdout] 615 | run_task_flow(&flow_info, flow_state, &execution_plan)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/runner.rs:635:9 [INFO] [stdout] | [INFO] [stdout] 635 | / match flow_info.config.config.on_error_task { [INFO] [stdout] 636 | | Some(ref on_error_task) => { [INFO] [stdout] 637 | | let mut error_flow_info = flow_info.clone(); [INFO] [stdout] 638 | | error_flow_info.disable_on_error = true; [INFO] [stdout] ... | [INFO] [stdout] 643 | | _ => (), [INFO] [stdout] 644 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 635 ~ if let Some(ref on_error_task) = flow_info.config.config.on_error_task { [INFO] [stdout] 636 + let mut error_flow_info = flow_info.clone(); [INFO] [stdout] 637 + error_flow_info.disable_on_error = true; [INFO] [stdout] 638 + error_flow_info.task = on_error_task.clone(); [INFO] [stdout] 639 + [INFO] [stdout] 640 + run_flow(&error_flow_info, flow_state, false)?; [INFO] [stdout] 641 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/runner.rs:664:33 [INFO] [stdout] | [INFO] [stdout] 664 | time_summary::init(&config, &cli_args); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `cli_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: length comparison to zero [INFO] [stdout] --> src/lib/scriptengine/duck_script/sdk/cm_run_task.rs:36:20 [INFO] [stdout] | [INFO] [stdout] 36 | if context.arguments.len() > 0 && context.arguments[0] == "--async" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!context.arguments.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/scriptengine/duck_script/mod.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | script: &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] 24 - script: &Vec, [INFO] [stdout] 24 + script: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lib/scriptengine/duck_script/mod.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | 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/lib/scriptengine/duck_script/mod.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | 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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lib/scriptengine/generic_script.rs:17:13 [INFO] [stdout] | [INFO] [stdout] 17 | runner: &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] 17 - runner: &String, [INFO] [stdout] 17 + runner: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/scriptengine/generic_script.rs:21:20 [INFO] [stdout] | [INFO] [stdout] 21 | let mut args = match arguments { [INFO] [stdout] | ____________________^ [INFO] [stdout] 22 | | Some(values) => values, [INFO] [stdout] 23 | | None => vec![], [INFO] [stdout] 24 | | }; [INFO] [stdout] | |_____^ help: replace it with: `arguments.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/scriptengine/generic_script.rs:41:20 [INFO] [stdout] | [INFO] [stdout] 41 | cli_arguments: &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] 41 ~ cli_arguments: &[String], [INFO] [stdout] 42 | validate: bool, [INFO] [stdout] ... [INFO] [stdout] 45 | [INFO] [stdout] 46 ~ let valid = run_file(&file, &runner, arguments, &mut cli_arguments.to_owned())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/scriptengine/os_script.rs:20:43 [INFO] [stdout] | [INFO] [stdout] 20 | command::run_script_get_exit_code(&script_text, runner, &cli_arguments, validate)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `script_text` [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/lib/scriptengine/os_script.rs:20:65 [INFO] [stdout] | [INFO] [stdout] 20 | command::run_script_get_exit_code(&script_text, runner, &cli_arguments, validate)?; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `cli_arguments` [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/lib/scriptengine/rsscript.rs:84:20 [INFO] [stdout] | [INFO] [stdout] 84 | cli_arguments: &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] 84 ~ cli_arguments: &[String], [INFO] [stdout] 85 | provider: &ScriptRunner, [INFO] [stdout] ... [INFO] [stdout] 100 | args.push(file.to_string()); [INFO] [stdout] 101 ~ let mut cli_args = cli_arguments.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/scriptengine/rsscript.rs:126:51 [INFO] [stdout] | [INFO] [stdout] 126 | let valid = run_file(&file, runner_arguments, &cli_arguments, &provider)?; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `cli_arguments` [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/lib/scriptengine/script_utils.rs:18:18 [INFO] [stdout] | [INFO] [stdout] 18 | script_text: &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] 18 - script_text: &Vec, [INFO] [stdout] 18 + script_text: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/scriptengine/script_utils.rs:23:29 [INFO] [stdout] | [INFO] [stdout] 23 | create_text_file(&text, &extension) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `extension` [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/lib/scriptengine/script_utils.rs:40:18 [INFO] [stdout] | [INFO] [stdout] 40 | script_text: &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] 40 - script_text: &Vec, [INFO] [stdout] 40 + script_text: &[String], [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/lib/scriptengine/shebang_script.rs:38:40 [INFO] [stdout] | [INFO] [stdout] 38 | pub(crate) fn get_shebang(script_text: &Vec) -> Shebang { [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] 38 - pub(crate) fn get_shebang(script_text: &Vec) -> Shebang { [INFO] [stdout] 38 + pub(crate) fn get_shebang(script_text: &[String]) -> Shebang { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/scriptengine/shebang_script.rs:52:42 [INFO] [stdout] | [INFO] [stdout] 52 | ... let runner = match values.next() { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 53 | | ... Some(value) => Some(value.trim().to_string()), [INFO] [stdout] 54 | | ... _ => None, [INFO] [stdout] 55 | | ... }; [INFO] [stdout] | |_______________________^ help: try: `values.next().map(|value| value.trim().to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/scriptengine/shebang_script.rs:110:31 [INFO] [stdout] | [INFO] [stdout] 110 | let shebang = get_shebang(&script_text); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `script_text` [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/lib/scriptengine/shebang_script.rs:120:17 [INFO] [stdout] | [INFO] [stdout] 120 | &script_text, [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `script_text` [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/lib/scriptengine/shebang_script.rs:124:17 [INFO] [stdout] | [INFO] [stdout] 124 | &cli_arguments, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `cli_arguments` [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/lib/scriptengine/mod.rs:135:47 [INFO] [stdout] | [INFO] [stdout] 135 | let script_text = get_script_text(&script)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `script` [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 function has too many arguments (8/7) [INFO] [stdout] --> src/lib/scriptengine/mod.rs:250:1 [INFO] [stdout] | [INFO] [stdout] 250 | / fn invoke_script( [INFO] [stdout] 251 | | script: &ScriptValue, [INFO] [stdout] 252 | | script_runner: Option, [INFO] [stdout] 253 | | script_runner_args: Option>, [INFO] [stdout] ... | [INFO] [stdout] 258 | | cli_arguments: &Vec, [INFO] [stdout] 259 | | ) -> Result { [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/scriptengine/mod.rs:260:34 [INFO] [stdout] | [INFO] [stdout] 260 | let expanded_script_runner = match script_runner { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 261 | | Some(ref value) => Some(environment::expand_value(value)), [INFO] [stdout] 262 | | None => None, [INFO] [stdout] 263 | | }; [INFO] [stdout] | |_____^ help: try: `script_runner.as_ref().map(|value| environment::expand_value(value))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/time_summary.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / match start_time.elapsed() { [INFO] [stdout] 16 | | Ok(elapsed) => time_summary.push((name.to_string(), elapsed.as_millis())), [INFO] [stdout] 17 | | _ => (), [INFO] [stdout] 18 | | }; [INFO] [stdout] | |_____^ help: try: `if let Ok(elapsed) = start_time.elapsed() { time_summary.push((name.to_string(), elapsed.as_millis())) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/time_summary.rs:21:35 [INFO] [stdout] | [INFO] [stdout] 21 | pub(crate) fn print(time_summary: &Vec<(String, u128)>) { [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] 21 ~ pub(crate) fn print(time_summary: &[(String, u128)]) { [INFO] [stdout] 22 | if is_time_summary_enabled() { [INFO] [stdout] 23 ~ let mut time_summary_sorted = time_summary.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lib/time_summary.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | total_time = total_time + entry.1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `total_time += entry.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/lib/toolchain.rs:27:31 [INFO] [stdout] | [INFO] [stdout] 27 | let channel = get_channel(&toolchain); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `toolchain` [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: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/lib/toolchain.rs:58:12 [INFO] [stdout] | [INFO] [stdout] 58 | if let Err(_) = spec_min_version { [INFO] [stdout] | -------^^^^^^------------------- help: try: `if spec_min_version.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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/toolchain.rs:65:31 [INFO] [stdout] | [INFO] [stdout] 65 | let channel = get_channel(&toolchain); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `toolchain` [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/lib/toolchain.rs:72:15 [INFO] [stdout] | [INFO] [stdout] 72 | .args(&["run", &channel, "rustc", "--version"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["run", &channel, "rustc", "--version"]` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/version.rs:145:14 [INFO] [stdout] | [INFO] [stdout] 145 | is_newer(&VERSION, &version_string, false, false) [INFO] [stdout] | ^^^^^^^^ help: change this to: `VERSION` [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/lib/version.rs:145:24 [INFO] [stdout] | [INFO] [stdout] 145 | is_newer(&VERSION, &version_string, false, false) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `version_string` [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/lib/version.rs:230:33 [INFO] [stdout] | [INFO] [stdout] 230 | && should_check_overdue(&global_config) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `global_config` [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 `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib/version.rs:250:13 [INFO] [stdout] | [INFO] [stdout] 250 | / if is_newer_found(&value) { [INFO] [stdout] 251 | | print_notification(&value); [INFO] [stdout] 252 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 249 ~ Some(value) [INFO] [stdout] 250 ~ if is_newer_found(&value) => { [INFO] [stdout] 251 | print_notification(&value); [INFO] [stdout] 252 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/version.rs:248:5 [INFO] [stdout] | [INFO] [stdout] 248 | / match latest { [INFO] [stdout] 249 | | Some(value) => { [INFO] [stdout] 250 | | if is_newer_found(&value) { [INFO] [stdout] 251 | | print_notification(&value); [INFO] [stdout] ... | [INFO] [stdout] 254 | | None => (), [INFO] [stdout] 255 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 248 ~ if let Some(value) = latest { [INFO] [stdout] 249 + if is_newer_found(&value) { [INFO] [stdout] 250 + print_notification(&value); [INFO] [stdout] 251 + } [INFO] [stdout] 252 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib/test/mod.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | return !ci_info::is_ci(); [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] 63 - return !ci_info::is_ci(); [INFO] [stdout] 63 + !ci_info::is_ci() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/types_test.rs:1344:54 [INFO] [stdout] | [INFO] [stdout] 1344 | let install_crate: InstallCrate = toml::from_str(&toml_str).unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `toml_str` [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/lib/types_test.rs:1358:54 [INFO] [stdout] | [INFO] [stdout] 1358 | let install_crate: InstallCrate = toml::from_str(&toml_str).unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `toml_str` [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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/lib/types_test.rs:4787:5 [INFO] [stdout] | [INFO] [stdout] 4787 | task_condition.condition_type = Some(ConditionType::And); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `types::TaskCondition { condition_type: Some(ConditionType::And), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/lib/types_test.rs:4786:5 [INFO] [stdout] | [INFO] [stdout] 4786 | let mut task_condition = TaskCondition::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/lib/types_test.rs:4796:5 [INFO] [stdout] | [INFO] [stdout] 4796 | task_condition.condition_type = Some(ConditionType::Or); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `types::TaskCondition { condition_type: Some(ConditionType::Or), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/lib/types_test.rs:4795:5 [INFO] [stdout] | [INFO] [stdout] 4795 | let mut task_condition = TaskCondition::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/lib/types_test.rs:4805:5 [INFO] [stdout] | [INFO] [stdout] 4805 | task_condition.condition_type = Some(ConditionType::GroupOr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `types::TaskCondition { condition_type: Some(ConditionType::GroupOr), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/lib/types_test.rs:4804:5 [INFO] [stdout] | [INFO] [stdout] 4804 | let mut task_condition = TaskCondition::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/types.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | if namespace.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!namespace.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: you should consider adding a `Default` implementation for `CliArgs` [INFO] [stdout] --> src/lib/types.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 138 | / pub fn new() -> CliArgs { [INFO] [stdout] 139 | | CliArgs { [INFO] [stdout] 140 | | command: "".to_string(), [INFO] [stdout] 141 | | build_file: None, [INFO] [stdout] ... | [INFO] [stdout] 167 | | } [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] 136 + impl Default for CliArgs { [INFO] [stdout] 137 + fn default() -> Self { [INFO] [stdout] 138 + Self::new() [INFO] [stdout] 139 + } [INFO] [stdout] 140 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:630:21 [INFO] [stdout] | [INFO] [stdout] 630 | None => match other.crate_name { [INFO] [stdout] | _____________________^ [INFO] [stdout] 631 | | None => true, [INFO] [stdout] 632 | | _ => false, [INFO] [stdout] 633 | | }, [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] 630 - None => match other.crate_name { [INFO] [stdout] 631 - None => true, [INFO] [stdout] 632 - _ => false, [INFO] [stdout] 633 - }, [INFO] [stdout] 630 + None => matches!(other.crate_name, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:630:21 [INFO] [stdout] | [INFO] [stdout] 630 | None => match other.crate_name { [INFO] [stdout] | _____________________^ [INFO] [stdout] 631 | | None => true, [INFO] [stdout] 632 | | _ => false, [INFO] [stdout] 633 | | }, [INFO] [stdout] | |_____________^ help: try: `other.crate_name.is_none()` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:644:21 [INFO] [stdout] | [INFO] [stdout] 644 | None => match other.min_version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 645 | | None => true, [INFO] [stdout] 646 | | _ => false, [INFO] [stdout] 647 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 644 - None => match other.min_version { [INFO] [stdout] 645 - None => true, [INFO] [stdout] 646 - _ => false, [INFO] [stdout] 647 - }, [INFO] [stdout] 644 + None => matches!(other.min_version, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:644:21 [INFO] [stdout] | [INFO] [stdout] 644 | None => match other.min_version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 645 | | None => true, [INFO] [stdout] 646 | | _ => false, [INFO] [stdout] 647 | | }, [INFO] [stdout] | |_____________^ help: try: `other.min_version.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:658:21 [INFO] [stdout] | [INFO] [stdout] 658 | None => match other.install_command { [INFO] [stdout] | _____________________^ [INFO] [stdout] 659 | | None => true, [INFO] [stdout] 660 | | _ => false, [INFO] [stdout] 661 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 658 - None => match other.install_command { [INFO] [stdout] 659 - None => true, [INFO] [stdout] 660 - _ => false, [INFO] [stdout] 661 - }, [INFO] [stdout] 658 + None => matches!(other.install_command, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:658:21 [INFO] [stdout] | [INFO] [stdout] 658 | None => match other.install_command { [INFO] [stdout] | _____________________^ [INFO] [stdout] 659 | | None => true, [INFO] [stdout] 660 | | _ => false, [INFO] [stdout] 661 | | }, [INFO] [stdout] | |_____________^ help: try: `other.install_command.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:672:21 [INFO] [stdout] | [INFO] [stdout] 672 | None => match other.force { [INFO] [stdout] | _____________________^ [INFO] [stdout] 673 | | None => true, [INFO] [stdout] 674 | | _ => false, [INFO] [stdout] 675 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 672 - None => match other.force { [INFO] [stdout] 673 - None => true, [INFO] [stdout] 674 - _ => false, [INFO] [stdout] 675 - }, [INFO] [stdout] 672 + None => matches!(other.force, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:672:21 [INFO] [stdout] | [INFO] [stdout] 672 | None => match other.force { [INFO] [stdout] | _____________________^ [INFO] [stdout] 673 | | None => true, [INFO] [stdout] 674 | | _ => false, [INFO] [stdout] 675 | | }, [INFO] [stdout] | |_____________^ help: try: `other.force.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib/types.rs:713:21 [INFO] [stdout] | [INFO] [stdout] 713 | / if rustup_component_name == other_rustup_component_name { [INFO] [stdout] 714 | | true [INFO] [stdout] 715 | | } else { [INFO] [stdout] 716 | | false [INFO] [stdout] 717 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 712 ~ Some(ref other_rustup_component_name) [INFO] [stdout] 713 ~ if rustup_component_name == other_rustup_component_name => { [INFO] [stdout] 714 | true [INFO] [stdout] 715 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lib/types.rs:713:21 [INFO] [stdout] | [INFO] [stdout] 713 | / if rustup_component_name == other_rustup_component_name { [INFO] [stdout] 714 | | true [INFO] [stdout] 715 | | } else { [INFO] [stdout] 716 | | false [INFO] [stdout] 717 | | } [INFO] [stdout] | |_____________________^ help: you can reduce it to: `rustup_component_name == other_rustup_component_name` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:721:21 [INFO] [stdout] | [INFO] [stdout] 721 | None => match other.rustup_component_name { [INFO] [stdout] | _____________________^ [INFO] [stdout] 722 | | None => true, [INFO] [stdout] 723 | | _ => false, [INFO] [stdout] 724 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 721 - None => match other.rustup_component_name { [INFO] [stdout] 722 - None => true, [INFO] [stdout] 723 - _ => false, [INFO] [stdout] 724 - }, [INFO] [stdout] 721 + None => matches!(other.rustup_component_name, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:721:21 [INFO] [stdout] | [INFO] [stdout] 721 | None => match other.rustup_component_name { [INFO] [stdout] | _____________________^ [INFO] [stdout] 722 | | None => true, [INFO] [stdout] 723 | | _ => false, [INFO] [stdout] 724 | | }, [INFO] [stdout] | |_____________^ help: try: `other.rustup_component_name.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:735:21 [INFO] [stdout] | [INFO] [stdout] 735 | None => match other.min_version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 736 | | None => true, [INFO] [stdout] 737 | | _ => false, [INFO] [stdout] 738 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 735 - None => match other.min_version { [INFO] [stdout] 736 - None => true, [INFO] [stdout] 737 - _ => false, [INFO] [stdout] 738 - }, [INFO] [stdout] 735 + None => matches!(other.min_version, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:735:21 [INFO] [stdout] | [INFO] [stdout] 735 | None => match other.min_version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 736 | | None => true, [INFO] [stdout] 737 | | _ => false, [INFO] [stdout] 738 | | }, [INFO] [stdout] | |_____________^ help: try: `other.min_version.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:749:21 [INFO] [stdout] | [INFO] [stdout] 749 | None => match other.version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 750 | | None => true, [INFO] [stdout] 751 | | _ => false, [INFO] [stdout] 752 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 749 - None => match other.version { [INFO] [stdout] 750 - None => true, [INFO] [stdout] 751 - _ => false, [INFO] [stdout] 752 - }, [INFO] [stdout] 749 + None => matches!(other.version, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:749:21 [INFO] [stdout] | [INFO] [stdout] 749 | None => match other.version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 750 | | None => true, [INFO] [stdout] 751 | | _ => false, [INFO] [stdout] 752 | | }, [INFO] [stdout] | |_____________^ help: try: `other.version.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:763:21 [INFO] [stdout] | [INFO] [stdout] 763 | None => match other.install_command { [INFO] [stdout] | _____________________^ [INFO] [stdout] 764 | | None => true, [INFO] [stdout] 765 | | _ => false, [INFO] [stdout] 766 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 763 - None => match other.install_command { [INFO] [stdout] 764 - None => true, [INFO] [stdout] 765 - _ => false, [INFO] [stdout] 766 - }, [INFO] [stdout] 763 + None => matches!(other.install_command, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:763:21 [INFO] [stdout] | [INFO] [stdout] 763 | None => match other.install_command { [INFO] [stdout] | _____________________^ [INFO] [stdout] 764 | | None => true, [INFO] [stdout] 765 | | _ => false, [INFO] [stdout] 766 | | }, [INFO] [stdout] | |_____________^ help: try: `other.install_command.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:777:21 [INFO] [stdout] | [INFO] [stdout] 777 | None => match other.force { [INFO] [stdout] | _____________________^ [INFO] [stdout] 778 | | None => true, [INFO] [stdout] 779 | | _ => false, [INFO] [stdout] 780 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 777 - None => match other.force { [INFO] [stdout] 778 - None => true, [INFO] [stdout] 779 - _ => false, [INFO] [stdout] 780 - }, [INFO] [stdout] 777 + None => matches!(other.force, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:777:21 [INFO] [stdout] | [INFO] [stdout] 777 | None => match other.force { [INFO] [stdout] | _____________________^ [INFO] [stdout] 778 | | None => true, [INFO] [stdout] 779 | | _ => false, [INFO] [stdout] 780 | | }, [INFO] [stdout] | |_____________^ help: try: `other.force.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:806:25 [INFO] [stdout] | [INFO] [stdout] 806 | None => match other.binary { [INFO] [stdout] | _________________________^ [INFO] [stdout] 807 | | None => true, [INFO] [stdout] 808 | | _ => false, [INFO] [stdout] 809 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 806 - None => match other.binary { [INFO] [stdout] 807 - None => true, [INFO] [stdout] 808 - _ => false, [INFO] [stdout] 809 - }, [INFO] [stdout] 806 + None => matches!(other.binary, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:806:25 [INFO] [stdout] | [INFO] [stdout] 806 | None => match other.binary { [INFO] [stdout] | _________________________^ [INFO] [stdout] 807 | | None => true, [INFO] [stdout] 808 | | _ => false, [INFO] [stdout] 809 | | }, [INFO] [stdout] | |_________________^ help: try: `other.binary.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:952:21 [INFO] [stdout] | [INFO] [stdout] 952 | None => match other.version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 953 | | None => true, [INFO] [stdout] 954 | | _ => false, [INFO] [stdout] 955 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 952 - None => match other.version { [INFO] [stdout] 953 - None => true, [INFO] [stdout] 954 - _ => false, [INFO] [stdout] 955 - }, [INFO] [stdout] 952 + None => matches!(other.version, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:952:21 [INFO] [stdout] | [INFO] [stdout] 952 | None => match other.version { [INFO] [stdout] | _____________________^ [INFO] [stdout] 953 | | None => true, [INFO] [stdout] 954 | | _ => false, [INFO] [stdout] 955 | | }, [INFO] [stdout] | |_____________^ help: try: `other.version.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:964:25 [INFO] [stdout] | [INFO] [stdout] 964 | None => match other.postpone { [INFO] [stdout] | _________________________^ [INFO] [stdout] 965 | | None => true, [INFO] [stdout] 966 | | _ => false, [INFO] [stdout] 967 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 964 - None => match other.postpone { [INFO] [stdout] 965 - None => true, [INFO] [stdout] 966 - _ => false, [INFO] [stdout] 967 - }, [INFO] [stdout] 964 + None => matches!(other.postpone, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:964:25 [INFO] [stdout] | [INFO] [stdout] 964 | None => match other.postpone { [INFO] [stdout] | _________________________^ [INFO] [stdout] 965 | | None => true, [INFO] [stdout] 966 | | _ => false, [INFO] [stdout] 967 | | }, [INFO] [stdout] | |_________________^ help: try: `other.postpone.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:979:25 [INFO] [stdout] | [INFO] [stdout] 979 | None => match other.ignore_pattern { [INFO] [stdout] | _________________________^ [INFO] [stdout] 980 | | None => true, [INFO] [stdout] 981 | | _ => false, [INFO] [stdout] 982 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 979 - None => match other.ignore_pattern { [INFO] [stdout] 980 - None => true, [INFO] [stdout] 981 - _ => false, [INFO] [stdout] 982 - }, [INFO] [stdout] 979 + None => matches!(other.ignore_pattern, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:979:25 [INFO] [stdout] | [INFO] [stdout] 979 | None => match other.ignore_pattern { [INFO] [stdout] | _________________________^ [INFO] [stdout] 980 | | None => true, [INFO] [stdout] 981 | | _ => false, [INFO] [stdout] 982 | | }, [INFO] [stdout] | |_________________^ help: try: `other.ignore_pattern.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:994:25 [INFO] [stdout] | [INFO] [stdout] 994 | None => match other.no_git_ignore { [INFO] [stdout] | _________________________^ [INFO] [stdout] 995 | | None => true, [INFO] [stdout] 996 | | _ => false, [INFO] [stdout] 997 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 994 - None => match other.no_git_ignore { [INFO] [stdout] 995 - None => true, [INFO] [stdout] 996 - _ => false, [INFO] [stdout] 997 - }, [INFO] [stdout] 994 + None => matches!(other.no_git_ignore, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:994:25 [INFO] [stdout] | [INFO] [stdout] 994 | None => match other.no_git_ignore { [INFO] [stdout] | _________________________^ [INFO] [stdout] 995 | | None => true, [INFO] [stdout] 996 | | _ => false, [INFO] [stdout] 997 | | }, [INFO] [stdout] | |_________________^ help: try: `other.no_git_ignore.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/types.rs:1009:25 [INFO] [stdout] | [INFO] [stdout] 1009 | None => match other.watch { [INFO] [stdout] | _________________________^ [INFO] [stdout] 1010 | | None => true, [INFO] [stdout] 1011 | | _ => false, [INFO] [stdout] 1012 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 1009 - None => match other.watch { [INFO] [stdout] 1010 - None => true, [INFO] [stdout] 1011 - _ => false, [INFO] [stdout] 1012 - }, [INFO] [stdout] 1009 + None => matches!(other.watch, None), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lib/types.rs:1009:25 [INFO] [stdout] | [INFO] [stdout] 1009 | None => match other.watch { [INFO] [stdout] | _________________________^ [INFO] [stdout] 1010 | | None => true, [INFO] [stdout] 1011 | | _ => false, [INFO] [stdout] 1012 | | }, [INFO] [stdout] | |_________________^ help: try: `other.watch.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/types.rs:1229:42 [INFO] [stdout] | [INFO] [stdout] 1229 | Self::Simple(ref channel) => &channel, [INFO] [stdout] | ^^^^^^^^ help: change this to: `channel` [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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/lib/types.rs:1327:1 [INFO] [stdout] | [INFO] [stdout] 1327 | impl Into for DependencyIdentifier { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 1327 ~ impl From for TaskIdentifier { [INFO] [stdout] 1328 ~ fn from(val: DependencyIdentifier) -> Self { [INFO] [stdout] 1329 ~ match val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib/types.rs:1346:17 [INFO] [stdout] | [INFO] [stdout] 1346 | / if value { [INFO] [stdout] 1347 | | self.private = Some(true); [INFO] [stdout] 1348 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1345 ~ Some(value) [INFO] [stdout] 1346 ~ if value => { [INFO] [stdout] 1347 | self.private = Some(true); [INFO] [stdout] 1348 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/types.rs:1344:9 [INFO] [stdout] | [INFO] [stdout] 1344 | / match modify_config.private { [INFO] [stdout] 1345 | | Some(value) => { [INFO] [stdout] 1346 | | if value { [INFO] [stdout] 1347 | | self.private = Some(true); [INFO] [stdout] ... | [INFO] [stdout] 1350 | | None => (), [INFO] [stdout] 1351 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1344 ~ if let Some(value) = modify_config.private { [INFO] [stdout] 1345 + if value { [INFO] [stdout] 1346 + self.private = Some(true); [INFO] [stdout] 1347 + } [INFO] [stdout] 1348 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib/types.rs:1355:17 [INFO] [stdout] | [INFO] [stdout] 1355 | / if namespace.len() > 0 { [INFO] [stdout] 1356 | | if self.extend.is_some() { [INFO] [stdout] 1357 | | self.extend = Some(get_namespaced_task_name( [INFO] [stdout] 1358 | | namespace, [INFO] [stdout] ... | [INFO] [stdout] 1456 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1354 ~ Some(ref namespace) [INFO] [stdout] 1355 ~ if namespace.len() > 0 => { [INFO] [stdout] 1356 | if self.extend.is_some() { [INFO] [stdout] ... [INFO] [stdout] 1455 | } [INFO] [stdout] 1456 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/types.rs:1353:9 [INFO] [stdout] | [INFO] [stdout] 1353 | / match modify_config.namespace { [INFO] [stdout] 1354 | | Some(ref namespace) => { [INFO] [stdout] 1355 | | if namespace.len() > 0 { [INFO] [stdout] 1356 | | if self.extend.is_some() { [INFO] [stdout] ... | [INFO] [stdout] 1458 | | None => (), [INFO] [stdout] 1459 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1353 ~ if let Some(ref namespace) = modify_config.namespace { [INFO] [stdout] 1354 + if namespace.len() > 0 { [INFO] [stdout] 1355 + if self.extend.is_some() { [INFO] [stdout] 1356 + self.extend = Some(get_namespaced_task_name( [INFO] [stdout] 1357 + namespace, [INFO] [stdout] 1358 + &self.extend.clone().unwrap(), [INFO] [stdout] 1359 + )); [INFO] [stdout] 1360 + } [INFO] [stdout] 1361 + [INFO] [stdout] 1362 + if self.alias.is_some() { [INFO] [stdout] 1363 + self.alias = Some(get_namespaced_task_name( [INFO] [stdout] 1364 + namespace, [INFO] [stdout] 1365 + &self.alias.clone().unwrap(), [INFO] [stdout] 1366 + )); [INFO] [stdout] 1367 + } [INFO] [stdout] 1368 + [INFO] [stdout] 1369 + if self.linux_alias.is_some() { [INFO] [stdout] 1370 + self.linux_alias = Some(get_namespaced_task_name( [INFO] [stdout] 1371 + namespace, [INFO] [stdout] 1372 + &self.linux_alias.clone().unwrap(), [INFO] [stdout] 1373 + )); [INFO] [stdout] 1374 + } [INFO] [stdout] 1375 + [INFO] [stdout] 1376 + if self.windows_alias.is_some() { [INFO] [stdout] 1377 + self.windows_alias = Some(get_namespaced_task_name( [INFO] [stdout] 1378 + namespace, [INFO] [stdout] 1379 + &self.windows_alias.clone().unwrap(), [INFO] [stdout] 1380 + )); [INFO] [stdout] 1381 + } [INFO] [stdout] 1382 + [INFO] [stdout] 1383 + if self.mac_alias.is_some() { [INFO] [stdout] 1384 + self.mac_alias = Some(get_namespaced_task_name( [INFO] [stdout] 1385 + namespace, [INFO] [stdout] 1386 + &self.mac_alias.clone().unwrap(), [INFO] [stdout] 1387 + )); [INFO] [stdout] 1388 + } [INFO] [stdout] 1389 + [INFO] [stdout] 1390 + if self.run_task.is_some() { [INFO] [stdout] 1391 + let mut run_task = self.run_task.clone().unwrap(); [INFO] [stdout] 1392 + [INFO] [stdout] 1393 + run_task = match run_task { [INFO] [stdout] 1394 + RunTaskInfo::Name(value) => { [INFO] [stdout] 1395 + RunTaskInfo::Name(get_namespaced_task_name(namespace, &value)) [INFO] [stdout] 1396 + } [INFO] [stdout] 1397 + RunTaskInfo::Details(mut run_task_details) => { [INFO] [stdout] 1398 + match run_task_details.name { [INFO] [stdout] 1399 + RunTaskName::Single(ref name) => { [INFO] [stdout] 1400 + run_task_details.name = RunTaskName::Single( [INFO] [stdout] 1401 + get_namespaced_task_name(namespace, name), [INFO] [stdout] 1402 + ) [INFO] [stdout] 1403 + } [INFO] [stdout] 1404 + RunTaskName::Multiple(ref names) => { [INFO] [stdout] 1405 + let mut updated_names = vec![]; [INFO] [stdout] 1406 + for name in names { [INFO] [stdout] 1407 + updated_names [INFO] [stdout] 1408 + .push(get_namespaced_task_name(namespace, name)); [INFO] [stdout] 1409 + } [INFO] [stdout] 1410 + [INFO] [stdout] 1411 + run_task_details.name = [INFO] [stdout] 1412 + RunTaskName::Multiple(updated_names); [INFO] [stdout] 1413 + } [INFO] [stdout] 1414 + }; [INFO] [stdout] 1415 + [INFO] [stdout] 1416 + RunTaskInfo::Details(run_task_details) [INFO] [stdout] 1417 + } [INFO] [stdout] 1418 + RunTaskInfo::Routing(mut routing_info_vector) => { [INFO] [stdout] 1419 + for routing_info in &mut routing_info_vector { [INFO] [stdout] 1420 + match routing_info.name { [INFO] [stdout] 1421 + RunTaskName::Single(ref name) => { [INFO] [stdout] 1422 + routing_info.name = RunTaskName::Single( [INFO] [stdout] 1423 + get_namespaced_task_name(namespace, name), [INFO] [stdout] 1424 + ) [INFO] [stdout] 1425 + } [INFO] [stdout] 1426 + RunTaskName::Multiple(ref names) => { [INFO] [stdout] 1427 + let mut updated_names = vec![]; [INFO] [stdout] 1428 + for name in names { [INFO] [stdout] 1429 + updated_names.push(get_namespaced_task_name( [INFO] [stdout] 1430 + namespace, name, [INFO] [stdout] 1431 + )); [INFO] [stdout] 1432 + } [INFO] [stdout] 1433 + [INFO] [stdout] 1434 + routing_info.name = [INFO] [stdout] 1435 + RunTaskName::Multiple(updated_names); [INFO] [stdout] 1436 + } [INFO] [stdout] 1437 + }; [INFO] [stdout] 1438 + } [INFO] [stdout] 1439 + [INFO] [stdout] 1440 + RunTaskInfo::Routing(routing_info_vector) [INFO] [stdout] 1441 + } [INFO] [stdout] 1442 + }; [INFO] [stdout] 1443 + [INFO] [stdout] 1444 + self.run_task = Some(run_task); [INFO] [stdout] 1445 + } [INFO] [stdout] 1446 + [INFO] [stdout] 1447 + if let Some(dependencies) = &self.dependencies { [INFO] [stdout] 1448 + self.dependencies = Some( [INFO] [stdout] 1449 + dependencies [INFO] [stdout] 1450 + .iter() [INFO] [stdout] 1451 + .map(|identifier| identifier.to_owned().with_namespace(namespace)) [INFO] [stdout] 1452 + .collect(), [INFO] [stdout] 1453 + ); [INFO] [stdout] 1454 + } [INFO] [stdout] 1455 + } [INFO] [stdout] 1456 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/types.rs:1355:20 [INFO] [stdout] | [INFO] [stdout] 1355 | if namespace.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!namespace.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 can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/types.rs:1468:31 [INFO] [stdout] | [INFO] [stdout] 1468 | let override_values = match task.clear { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 1469 | | Some(value) => value, [INFO] [stdout] 1470 | | None => false, [INFO] [stdout] 1471 | | }; [INFO] [stdout] | |_________^ help: replace it with: `task.clear.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1474:26 [INFO] [stdout] | [INFO] [stdout] 1474 | self.clear = task.clear.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.clear` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1490:29 [INFO] [stdout] | [INFO] [stdout] 1490 | self.disabled = task.disabled.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.disabled` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1496:28 [INFO] [stdout] | [INFO] [stdout] 1496 | self.private = task.private.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.private` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1514:30 [INFO] [stdout] | [INFO] [stdout] 1514 | self.workspace = task.workspace.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.workspace` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1550:34 [INFO] [stdout] | [INFO] [stdout] 1550 | self.ignore_errors = task.ignore_errors.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.ignore_errors` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1556:26 [INFO] [stdout] | [INFO] [stdout] 1556 | self.force = task.force.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.force` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/types.rs:1714:13 [INFO] [stdout] | [INFO] [stdout] 1714 | / match self.windows { [INFO] [stdout] 1715 | | Some(ref value) => Some(value.clone()), [INFO] [stdout] 1716 | | _ => None, [INFO] [stdout] 1717 | | } [INFO] [stdout] | |_____________^ help: try: `self.windows.as_ref().map(|value| value.clone())` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/types.rs:1719:13 [INFO] [stdout] | [INFO] [stdout] 1719 | / match self.mac { [INFO] [stdout] 1720 | | Some(ref value) => Some(value.clone()), [INFO] [stdout] 1721 | | _ => None, [INFO] [stdout] 1722 | | } [INFO] [stdout] | |_____________^ help: try: `self.mac.as_ref().map(|value| value.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/types.rs:1724:13 [INFO] [stdout] | [INFO] [stdout] 1724 | / match self.linux { [INFO] [stdout] 1725 | | Some(ref value) => Some(value.clone()), [INFO] [stdout] 1726 | | _ => None, [INFO] [stdout] 1727 | | } [INFO] [stdout] | |_____________^ help: try: `self.linux.as_ref().map(|value| value.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1738:28 [INFO] [stdout] | [INFO] [stdout] 1738 | clear: self.clear.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.clear` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1741:31 [INFO] [stdout] | [INFO] [stdout] 1741 | disabled: override_task.disabled.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `override_task.disabled` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1742:30 [INFO] [stdout] | [INFO] [stdout] 1742 | private: override_task.private.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `override_task.private` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1745:32 [INFO] [stdout] | [INFO] [stdout] 1745 | workspace: self.workspace.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.workspace` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1753:36 [INFO] [stdout] | [INFO] [stdout] 1753 | ignore_errors: override_task.ignore_errors.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `override_task.ignore_errors` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1754:28 [INFO] [stdout] | [INFO] [stdout] 1754 | force: override_task.force.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `override_task.force` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/types.rs:1804:18 [INFO] [stdout] | [INFO] [stdout] 1804 | _ => match self.alias { [INFO] [stdout] | __________________^ [INFO] [stdout] 1805 | | Some(ref alias) => Some(alias.clone()), [INFO] [stdout] 1806 | | _ => None, [INFO] [stdout] 1807 | | }, [INFO] [stdout] | |_____________^ help: try: `self.alias.as_ref().map(|alias| alias.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lib/types.rs:1816:13 [INFO] [stdout] | [INFO] [stdout] 1816 | actions_count = actions_count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `actions_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: manual implementation of an assign operation [INFO] [stdout] --> src/lib/types.rs:1819:13 [INFO] [stdout] | [INFO] [stdout] 1819 | actions_count = actions_count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `actions_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: manual implementation of an assign operation [INFO] [stdout] --> src/lib/types.rs:1822:13 [INFO] [stdout] | [INFO] [stdout] 1822 | actions_count = actions_count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `actions_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/lib/types.rs:1845:32 [INFO] [stdout] | [INFO] [stdout] 1845 | Some(ref value) => value.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value.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: length comparison to zero [INFO] [stdout] --> src/lib/types.rs:1853:32 [INFO] [stdout] | [INFO] [stdout] 1853 | Some(ref value) => value.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value.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: length comparison to zero [INFO] [stdout] --> src/lib/types.rs:1861:32 [INFO] [stdout] | [INFO] [stdout] 1861 | Some(ref value) => value.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value.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: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lib/types.rs:1883:9 [INFO] [stdout] | [INFO] [stdout] 1883 | / if actions_count <= 1 { [INFO] [stdout] 1884 | | true [INFO] [stdout] 1885 | | } else { [INFO] [stdout] 1886 | | false [INFO] [stdout] 1887 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `actions_count <= 1` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1964:33 [INFO] [stdout] | [INFO] [stdout] 1964 | self.disabled = task.disabled.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.disabled` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:1968:32 [INFO] [stdout] | [INFO] [stdout] 1968 | self.private = task.private.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.private` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2002:38 [INFO] [stdout] | [INFO] [stdout] 2002 | self.ignore_errors = task.ignore_errors.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.ignore_errors` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2006:30 [INFO] [stdout] | [INFO] [stdout] 2006 | self.force = task.force.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.force` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/types.rs:2113:36 [INFO] [stdout] | [INFO] [stdout] 2113 | Some(ref value) => value.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!value.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/types.rs:2207:9 [INFO] [stdout] | [INFO] [stdout] 2207 | / match modify_config.namespace { [INFO] [stdout] 2208 | | Some(ref namespace) => { [INFO] [stdout] 2209 | | if self.init_task.is_some() { [INFO] [stdout] 2210 | | self.init_task = Some(get_namespaced_task_name( [INFO] [stdout] ... | [INFO] [stdout] 2237 | | None => (), [INFO] [stdout] 2238 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2207 ~ if let Some(ref namespace) = modify_config.namespace { [INFO] [stdout] 2208 + if self.init_task.is_some() { [INFO] [stdout] 2209 + self.init_task = Some(get_namespaced_task_name( [INFO] [stdout] 2210 + namespace, [INFO] [stdout] 2211 + &self.init_task.clone().unwrap(), [INFO] [stdout] 2212 + )); [INFO] [stdout] 2213 + } [INFO] [stdout] 2214 + [INFO] [stdout] 2215 + if self.end_task.is_some() { [INFO] [stdout] 2216 + self.end_task = Some(get_namespaced_task_name( [INFO] [stdout] 2217 + namespace, [INFO] [stdout] 2218 + &self.end_task.clone().unwrap(), [INFO] [stdout] 2219 + )); [INFO] [stdout] 2220 + } [INFO] [stdout] 2221 + [INFO] [stdout] 2222 + if self.on_error_task.is_some() { [INFO] [stdout] 2223 + self.on_error_task = Some(get_namespaced_task_name( [INFO] [stdout] 2224 + namespace, [INFO] [stdout] 2225 + &self.on_error_task.clone().unwrap(), [INFO] [stdout] 2226 + )); [INFO] [stdout] 2227 + } [INFO] [stdout] 2228 + [INFO] [stdout] 2229 + if self.legacy_migration_task.is_some() { [INFO] [stdout] 2230 + self.legacy_migration_task = Some(get_namespaced_task_name( [INFO] [stdout] 2231 + namespace, [INFO] [stdout] 2232 + &self.legacy_migration_task.clone().unwrap(), [INFO] [stdout] 2233 + )); [INFO] [stdout] 2234 + } [INFO] [stdout] 2235 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2248:36 [INFO] [stdout] | [INFO] [stdout] 2248 | self.skip_core_tasks = extended.skip_core_tasks.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.skip_core_tasks` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2280:41 [INFO] [stdout] | [INFO] [stdout] 2280 | self.default_to_workspace = extended.default_to_workspace.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.default_to_workspace` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2284:38 [INFO] [stdout] | [INFO] [stdout] 2284 | self.skip_git_env_info = extended.skip_git_env_info.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.skip_git_env_info` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2288:39 [INFO] [stdout] | [INFO] [stdout] 2288 | self.skip_rust_env_info = extended.skip_rust_env_info.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.skip_rust_env_info` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2292:40 [INFO] [stdout] | [INFO] [stdout] 2292 | self.skip_crate_env_info = extended.skip_crate_env_info.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.skip_crate_env_info` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2296:34 [INFO] [stdout] | [INFO] [stdout] 2296 | self.reduce_output = extended.reduce_output.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.reduce_output` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2300:33 [INFO] [stdout] | [INFO] [stdout] 2300 | self.time_summary = extended.time_summary.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.time_summary` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2304:39 [INFO] [stdout] | [INFO] [stdout] 2304 | self.load_cargo_aliases = extended.load_cargo_aliases.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.load_cargo_aliases` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/types.rs:2308:36 [INFO] [stdout] | [INFO] [stdout] 2308 | self.disable_install = extended.disable_install.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `extended.disable_install` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/types.rs:2396:27 [INFO] [stdout] | [INFO] [stdout] 2396 | self.config.apply(&modify_config); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `modify_config` [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/lib/types.rs:2406:71 [INFO] [stdout] | [INFO] [stdout] 2406 | let namespaced_task = get_namespaced_task_name(namespace, &key); [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/types.rs:2409:24 [INFO] [stdout] | [INFO] [stdout] 2409 | task.apply(&modify_config); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `modify_config` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/cache.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | / match get_cache_directory(false) { [INFO] [stdout] 70 | | Some(directory) => { [INFO] [stdout] 71 | | let exists = if directory.exists() { [INFO] [stdout] 72 | | true [INFO] [stdout] ... | [INFO] [stdout] 98 | | None => (), [INFO] [stdout] 99 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 69 ~ if let Some(directory) = get_cache_directory(false) { [INFO] [stdout] 70 + let exists = if directory.exists() { [INFO] [stdout] 71 + true [INFO] [stdout] 72 + } else { [INFO] [stdout] 73 + match fsio::directory::create(&directory) { [INFO] [stdout] 74 + Ok(_) => true, [INFO] [stdout] 75 + _ => false, [INFO] [stdout] 76 + } [INFO] [stdout] 77 + }; [INFO] [stdout] 78 + [INFO] [stdout] 79 + if exists { [INFO] [stdout] 80 + let file_name = directory.join(CACHE_FILE); [INFO] [stdout] 81 + [INFO] [stdout] 82 + match toml::to_string_pretty(cache_data) { [INFO] [stdout] 83 + Ok(toml_str) => match write_text_file(&file_name, &toml_str) { [INFO] [stdout] 84 + Err(error) => info!( [INFO] [stdout] 85 + "Error while writing to cache file: {:#?}, error: {:#?}", [INFO] [stdout] 86 + &file_name, error [INFO] [stdout] 87 + ), [INFO] [stdout] 88 + _ => (), [INFO] [stdout] 89 + }, [INFO] [stdout] 90 + Err(error) => info!( [INFO] [stdout] 91 + "Error during serialization of cache, file: {:#?}, error: {:#?}", [INFO] [stdout] 92 + &file_name, error [INFO] [stdout] 93 + ), [INFO] [stdout] 94 + }; [INFO] [stdout] 95 + } [INFO] [stdout] 96 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/cache.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | / match fsio::directory::create(&directory) { [INFO] [stdout] 75 | | Ok(_) => true, [INFO] [stdout] 76 | | _ => false, [INFO] [stdout] 77 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 74 - match fsio::directory::create(&directory) { [INFO] [stdout] 75 - Ok(_) => true, [INFO] [stdout] 76 - _ => false, [INFO] [stdout] 77 - } [INFO] [stdout] 74 + matches!(fsio::directory::create(&directory), Ok(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/lib/cache.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | / match fsio::directory::create(&directory) { [INFO] [stdout] 75 | | Ok(_) => true, [INFO] [stdout] 76 | | _ => false, [INFO] [stdout] 77 | | } [INFO] [stdout] | |_________________^ help: try: `fsio::directory::create(&directory).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/cache.rs:84:37 [INFO] [stdout] | [INFO] [stdout] 84 | Ok(toml_str) => match write_text_file(&file_name, &toml_str) { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 85 | | Err(error) => info!( [INFO] [stdout] 86 | | "Error while writing to cache file: {:#?}, error: {:#?}", [INFO] [stdout] 87 | | &file_name, error [INFO] [stdout] 88 | | ), [INFO] [stdout] 89 | | _ => (), [INFO] [stdout] 90 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 84 ~ Ok(toml_str) => if let Err(error) = write_text_file(&file_name, &toml_str) { info!( [INFO] [stdout] 85 + "Error while writing to cache file: {:#?}, error: {:#?}", [INFO] [stdout] 86 + &file_name, error [INFO] [stdout] 87 ~ ) }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/cli_test.rs:214:34 [INFO] [stdout] | [INFO] [stdout] 214 | assert!(env::set_current_dir(&directory).is_ok()); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `directory` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/cli_test.rs:340:34 [INFO] [stdout] | [INFO] [stdout] 340 | assert!(env::set_current_dir(&directory).is_ok()); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `directory` [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/lib/cli_test.rs:384:34 [INFO] [stdout] | [INFO] [stdout] 384 | assert!(env::set_current_dir(&directory).is_ok()); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `directory` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:426:9 [INFO] [stdout] | [INFO] [stdout] 426 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:446:9 [INFO] [stdout] | [INFO] [stdout] 446 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:476:9 [INFO] [stdout] | [INFO] [stdout] 476 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:492:9 [INFO] [stdout] | [INFO] [stdout] 492 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:518:9 [INFO] [stdout] | [INFO] [stdout] 518 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:555:9 [INFO] [stdout] | [INFO] [stdout] 555 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:586:9 [INFO] [stdout] | [INFO] [stdout] 586 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:629:9 [INFO] [stdout] | [INFO] [stdout] 629 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:659:9 [INFO] [stdout] | [INFO] [stdout] 659 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:686:9 [INFO] [stdout] | [INFO] [stdout] 686 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:706:9 [INFO] [stdout] | [INFO] [stdout] 706 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:730:9 [INFO] [stdout] | [INFO] [stdout] 730 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/lib/cli_test.rs:760:9 [INFO] [stdout] | [INFO] [stdout] 760 | &"make".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"make"` [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/lib/cli.rs:58:30 [INFO] [stdout] | [INFO] [stdout] 58 | if version::should_check(&cli_args, &global_config) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `cli_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/lib/cli.rs:58:41 [INFO] [stdout] | [INFO] [stdout] 58 | if version::should_check(&cli_args, &global_config) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `global_config` [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/lib/cli.rs:70:21 [INFO] [stdout] | [INFO] [stdout] 70 | / match environment::get_project_root() { [INFO] [stdout] 71 | | Some(value) => Some(value.clone()), [INFO] [stdout] 72 | | None => None, [INFO] [stdout] 73 | | } [INFO] [stdout] | |_____________________^ help: try: `environment::get_project_root().map(|value| value.clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/cli.rs:81:15 [INFO] [stdout] | [INFO] [stdout] 81 | let cwd = match cwd_string_option { [INFO] [stdout] | _______________^ [INFO] [stdout] 82 | | Some(ref value) => Some(value.as_ref()), [INFO] [stdout] 83 | | None => None, [INFO] [stdout] 84 | | }; [INFO] [stdout] | |_____^ help: try: `cwd_string_option.as_ref().map(|value| value.as_ref())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/cli.rs:97:48 [INFO] [stdout] | [INFO] [stdout] 97 | let normalized_profile_name = profile::set(&profile_name); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `profile_name` [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/lib/cli.rs:104:35 [INFO] [stdout] | [INFO] [stdout] 104 | let config = descriptor::load(&build_file, force_makefile, env, experimental)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `build_file` [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: using `clone` on type `SystemTime` which implements the `Copy` trait [INFO] [stdout] --> src/lib/cli.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | start_time.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `start_time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/cli.rs:119:43 [INFO] [stdout] | [INFO] [stdout] 119 | let env_info = environment::setup_env(&cli_args, &config, &task, home, &mut time_summary_vec)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `cli_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/lib/cli.rs:119:63 [INFO] [stdout] | [INFO] [stdout] 119 | let env_info = environment::setup_env(&cli_args, &config, &task, home, &mut time_summary_vec)?; [INFO] [stdout] | ^^^^^ help: change this to: `task` [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: length comparison to zero [INFO] [stdout] --> src/lib/cli.rs:124:8 [INFO] [stdout] | [INFO] [stdout] 124 | if crate_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!crate_name.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/cli.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | &task, [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/cli.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | &cli_args, [INFO] [stdout] | ^^^^^^^^^ help: change this to: `cli_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/lib/cli.rs:155:13 [INFO] [stdout] | [INFO] [stdout] 155 | &task, [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/cli.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 165 | &task, [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/cli.rs:167:13 [INFO] [stdout] | [INFO] [stdout] 167 | &cli_args, [INFO] [stdout] | ^^^^^^^^^ help: change this to: `cli_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/lib/cli_commands/diff_steps.rs:49:54 [INFO] [stdout] | [INFO] [stdout] 49 | ..ExecutionPlanBuilder::new(internal_config, &task) [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/cli_commands/diff_steps.rs:58:54 [INFO] [stdout] | [INFO] [stdout] 58 | ..ExecutionPlanBuilder::new(external_config, &task) [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/cli_commands/diff_steps.rs:63:75 [INFO] [stdout] | [INFO] [stdout] 63 | &move |file: &mut File| write_as_string(&internal_execution_plan, &file), [INFO] [stdout] | ^^^^^ help: change this to: `file` [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/lib/cli_commands/diff_steps.rs:67:75 [INFO] [stdout] | [INFO] [stdout] 67 | &move |file: &mut File| write_as_string(&external_execution_plan, &file), [INFO] [stdout] | ^^^^^ help: change this to: `file` [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/lib/cli_commands/list_steps_test.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | &config, [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/lib/cli_commands/list_steps_test.rs:28:23 [INFO] [stdout] | [INFO] [stdout] 28 | path.push(&file); [INFO] [stdout] | ^^^^^ help: change this to: `file` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/cli_commands/list_steps_test.rs:31:29 [INFO] [stdout] | [INFO] [stdout] 31 | io::delete_file(&file); [INFO] [stdout] | ^^^^^ help: change this to: `file` [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/lib/cli_commands/list_steps_test.rs:37:29 [INFO] [stdout] | [INFO] [stdout] 37 | create_list(&config, output_format, &category, hide_uninteresting).unwrap(); [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/lib/cli_commands/list_steps.rs:24:30 [INFO] [stdout] | [INFO] [stdout] 24 | let output = create_list(&config, output_format, category, hide_uninteresting)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/lib/cli_commands/list_steps.rs:28:33 [INFO] [stdout] | [INFO] [stdout] 28 | io::write_text_file(&file, &output); [INFO] [stdout] | ^^^^^ help: change this to: `file` [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/lib/cli_commands/list_steps.rs:49:69 [INFO] [stdout] | [INFO] [stdout] 49 | let actual_task_name = execution_plan::get_actual_task_name(&config, &key)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/lib/cli_commands/list_steps.rs:49:78 [INFO] [stdout] | [INFO] [stdout] 49 | let actual_task_name = execution_plan::get_actual_task_name(&config, &key)?; [INFO] [stdout] | ^^^^ help: change this to: `key` [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/lib/cli_commands/list_steps.rs:51:56 [INFO] [stdout] | [INFO] [stdout] 51 | let task = execution_plan::get_normalized_task(&config, &actual_task_name, true)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:53:26 [INFO] [stdout] | [INFO] [stdout] 53 | let is_private = match task.private { [INFO] [stdout] | __________________________^ [INFO] [stdout] 54 | | Some(private) => private, [INFO] [stdout] 55 | | None => false, [INFO] [stdout] 56 | | }; [INFO] [stdout] | |_________^ help: ascribe the type bool and replace your expression with: `task.private.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:76:16 [INFO] [stdout] | [INFO] [stdout] 76 | if category_filter [INFO] [stdout] | ________________^ [INFO] [stdout] 77 | | .as_ref() [INFO] [stdout] 78 | | .map_or(false, |value| value != &category) [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 78 - .map_or(false, |value| value != &category) [INFO] [stdout] 78 + .is_some_and(|value| value != &category) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:108:25 [INFO] [stdout] | [INFO] [stdout] 108 | buffer.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `buffer.push(')')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:116:28 [INFO] [stdout] | [INFO] [stdout] 116 | let mut text = String::from(description); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `description` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:135:26 [INFO] [stdout] | [INFO] [stdout] 135 | buffer.push_str(&format!("# Task List\n\n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"# Task List\n\n".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: this `map_or` can be simplified [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:140:12 [INFO] [stdout] | [INFO] [stdout] 140 | if category_filter [INFO] [stdout] | ____________^ [INFO] [stdout] 141 | | .as_ref() [INFO] [stdout] 142 | | .map_or(false, |value| value != category) [INFO] [stdout] | |_____________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 142 - .map_or(false, |value| value != category) [INFO] [stdout] 142 + .is_some_and(|value| value != category) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lib/cli_commands/list_steps.rs:159:34 [INFO] [stdout] | [INFO] [stdout] 159 | buffer.push_str(&format!("* **")); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.to_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: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/cli_commands/print_steps.rs:28:37 [INFO] [stdout] | [INFO] [stdout] 28 | PrintFormat::Default => match other { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 29 | | PrintFormat::Default => true, [INFO] [stdout] 30 | | _ => false, [INFO] [stdout] 31 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 28 - PrintFormat::Default => match other { [INFO] [stdout] 29 - PrintFormat::Default => true, [INFO] [stdout] 30 - _ => false, [INFO] [stdout] 31 - }, [INFO] [stdout] 28 + PrintFormat::Default => matches!(other, PrintFormat::Default), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/cli_commands/print_steps.rs:32:46 [INFO] [stdout] | [INFO] [stdout] 32 | PrintFormat::ShortDescription => match other { [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 33 | | PrintFormat::ShortDescription => true, [INFO] [stdout] 34 | | _ => false, [INFO] [stdout] 35 | | }, [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 32 - PrintFormat::ShortDescription => match other { [INFO] [stdout] 33 - PrintFormat::ShortDescription => true, [INFO] [stdout] 34 - _ => false, [INFO] [stdout] 35 - }, [INFO] [stdout] 32 + PrintFormat::ShortDescription => matches!(other, PrintFormat::ShortDescription), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lib/cli_commands/print_steps.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | counter = counter + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `counter += 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 function has too many arguments (8/7) [INFO] [stdout] --> src/lib/cli_commands/print_steps.rs:78:1 [INFO] [stdout] | [INFO] [stdout] 78 | / pub fn print( [INFO] [stdout] 79 | | output_buffer: &mut impl io::Write, [INFO] [stdout] 80 | | config: &Config, [INFO] [stdout] 81 | | task: &str, [INFO] [stdout] ... | [INFO] [stdout] 86 | | skip_init_end_tasks: bool, [INFO] [stdout] 87 | | ) -> Result<(), CargoMakeError> { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` 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/lib/cli_commands/print_steps.rs:104:37 [INFO] [stdout] | [INFO] [stdout] 104 | ..ExecutionPlanBuilder::new(&config, &task) [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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/lib/cli_commands/print_steps.rs:104:46 [INFO] [stdout] | [INFO] [stdout] 104 | ..ExecutionPlanBuilder::new(&config, &task) [INFO] [stdout] | ^^^^^ help: change this to: `task` [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/lib/cli_commands/print_steps.rs:109:40 [INFO] [stdout] | [INFO] [stdout] 109 | let print_format = get_format_type(&output_format); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `output_format` [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/lib/cli_parser.rs:42:27 [INFO] [stdout] | [INFO] [stdout] 42 | cli_args.build_file = match cli_parsed.get_first_value("makefile") { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 43 | | Some(value) => Some(value), [INFO] [stdout] 44 | | None => None, [INFO] [stdout] 45 | | }; [INFO] [stdout] | |_____^ help: try: `cli_parsed.get_first_value("makefile").map(|value| value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/cli_parser.rs:47:27 [INFO] [stdout] | [INFO] [stdout] 47 | cli_args.completion = match cli_parsed.get_first_value("completion") { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 48 | | Some(value) => Some(value.to_string()), [INFO] [stdout] 49 | | None => None, [INFO] [stdout] 50 | | }; [INFO] [stdout] | |_____^ help: try: `cli_parsed.get_first_value("completion").map(|value| value.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/cli_parser.rs:71:33 [INFO] [stdout] | [INFO] [stdout] 71 | let default_disable_color = match global_config.disable_color { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 72 | | Some(value) => value, [INFO] [stdout] 73 | | None => false, [INFO] [stdout] 74 | | }; [INFO] [stdout] | |_____^ help: replace it with: `global_config.disable_color.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/cli_parser.rs:82:25 [INFO] [stdout] | [INFO] [stdout] 82 | cli_args.env_file = match cli_parsed.get_first_value("envfile") { [INFO] [stdout] | _________________________^ [INFO] [stdout] 83 | | Some(value) => Some(value.to_string()), [INFO] [stdout] 84 | | None => None, [INFO] [stdout] 85 | | }; [INFO] [stdout] | |_____^ help: try: `cli_parsed.get_first_value("envfile").map(|value| value.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/cli_parser.rs:92:36 [INFO] [stdout] | [INFO] [stdout] 92 | cli_args.list_category_steps = match cli_parsed.get_first_value("list-category-steps") { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 93 | | Some(value) => Some(value.to_string()), [INFO] [stdout] 94 | | None => None, [INFO] [stdout] 95 | | }; [INFO] [stdout] | |_____^ help: try: `cli_parsed.get_first_value("list-category-steps").map(|value| value.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/cli_parser.rs:97:28 [INFO] [stdout] | [INFO] [stdout] 97 | cli_args.output_file = match cli_parsed.get_first_value("output-file") { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 98 | | Some(value) => Some(value.to_string()), [INFO] [stdout] 99 | | None => None, [INFO] [stdout] 100 | | }; [INFO] [stdout] | |_____^ help: try: `cli_parsed.get_first_value("output-file").map(|value| value.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib/cli_parser.rs:118:35 [INFO] [stdout] | [INFO] [stdout] 118 | cli_args.skip_tasks_pattern = match cli_parsed.get_first_value("skip-tasks-pattern") { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 119 | | Some(value) => Some(value.to_string()), [INFO] [stdout] 120 | | None => None, [INFO] [stdout] 121 | | }; [INFO] [stdout] | |_____^ help: try: `cli_parsed.get_first_value("skip-tasks-pattern").map(|value| value.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/lib/cli_parser.rs:132:29 [INFO] [stdout] | [INFO] [stdout] 132 | let (task, arguments) = match task_cmd_slice { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 133 | | &[] => (task, None), [INFO] [stdout] 134 | | &[ref task_name, ref task_args @ ..] => { [INFO] [stdout] 135 | | let args_strings = task_args.iter().map(|item| item.to_string()).collect(); [INFO] [stdout] ... | [INFO] [stdout] 138 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 132 ~ let (task, arguments) = match *task_cmd_slice { [INFO] [stdout] 133 ~ [] => (task, None), [INFO] [stdout] 134 ~ [ref task_name, ref task_args @ ..] => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/cli_parser.rs:148:17 [INFO] [stdout] | [INFO] [stdout] 148 | None => &DEFAULT_TASK_NAME, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `DEFAULT_TASK_NAME` [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/lib/cli_parser.rs:152:17 [INFO] [stdout] | [INFO] [stdout] 152 | None => &DEFAULT_LOG_LEVEL, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `DEFAULT_LOG_LEVEL` [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/lib/cli_parser.rs:515:13 [INFO] [stdout] | [INFO] [stdout] 515 | &global_config, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `global_config` [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/lib/cli_parser.rs:532:20 [INFO] [stdout] | [INFO] [stdout] 532 | create_cli(&global_config, CliSpec::new(), true), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `global_config` [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/lib/cli_parser.rs:537:5 [INFO] [stdout] | [INFO] [stdout] 537 | / match vec_option { [INFO] [stdout] 538 | | Some(vec) => Some(vec.to_owned()), [INFO] [stdout] 539 | | None => None, [INFO] [stdout] 540 | | } [INFO] [stdout] | |_____^ help: try: `vec_option.map(|vec| vec.to_owned())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib/command_test.rs:32:23 [INFO] [stdout] | [INFO] [stdout] 32 | get_exit_code(Err(Error::new(ErrorKind::Other, "test")), false); [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] 32 - get_exit_code(Err(Error::new(ErrorKind::Other, "test")), false); [INFO] [stdout] 32 + get_exit_code(Err(Error::other("test")), false); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::ToolchainSpecifier` [INFO] [stdout] --> src/lib/command_test.rs:160:31 [INFO] [stdout] | [INFO] [stdout] 160 | task.toolchain = Some(toolchain.into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `toolchain` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/lib/command.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | / match code.code() { [INFO] [stdout] 27 | | Some(value) => value, [INFO] [stdout] 28 | | None => -1, [INFO] [stdout] 29 | | } [INFO] [stdout] | |_________________^ help: replace with: `code.code().unwrap_or(-1)` [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: you don't need to add `&` to all patterns [INFO] [stdout] --> src/lib/command.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | / match output { [INFO] [stdout] 46 | | &Ok(ref output_struct) => get_exit_code(Ok(output_struct.status), force), [INFO] [stdout] 47 | | &Err(ref error) => { [INFO] [stdout] 48 | | if !force { [INFO] [stdout] ... | [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 45 ~ match *output { [INFO] [stdout] 46 ~ Ok(ref output_struct) => get_exit_code(Ok(output_struct.status), force), [INFO] [stdout] 47 ~ Err(ref error) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/command.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | &Ok(ref output_struct) => get_exit_code(Ok(output_struct.status), force), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 46 - &Ok(ref output_struct) => get_exit_code(Ok(output_struct.status), force), [INFO] [stdout] 46 + Ok(output_struct) => get_exit_code(Ok(output_struct.status), force), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/command.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | &Err(ref error) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 47 - &Err(ref error) => { [INFO] [stdout] 47 + Err(error) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/command.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | / match level { [INFO] [stdout] 77 | | logger::LogLevel::ERROR => true, [INFO] [stdout] 78 | | logger::LogLevel::OFF => true, [INFO] [stdout] 79 | | _ => false, [INFO] [stdout] 80 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 76 - match level { [INFO] [stdout] 77 - logger::LogLevel::ERROR => true, [INFO] [stdout] 78 - logger::LogLevel::OFF => true, [INFO] [stdout] 79 - _ => false, [INFO] [stdout] 80 - } [INFO] [stdout] 76 + matches!(level, logger::LogLevel::ERROR | logger::LogLevel::OFF) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/lib/command.rs:105:5 [INFO] [stdout] | [INFO] [stdout] 105 | / match level { [INFO] [stdout] 106 | | logger::LogLevel::VERBOSE => true, [INFO] [stdout] 107 | | _ => false, [INFO] [stdout] 108 | | } [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 105 - match level { [INFO] [stdout] 106 - logger::LogLevel::VERBOSE => true, [INFO] [stdout] 107 - _ => false, [INFO] [stdout] 108 - } [INFO] [stdout] 105 + matches!(level, logger::LogLevel::VERBOSE) [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/lib/command.rs:113:19 [INFO] [stdout] | [INFO] [stdout] 113 | script_lines: &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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 113 - script_lines: &Vec, [INFO] [stdout] 113 + script_lines: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/command.rs:152:40 [INFO] [stdout] | [INFO] [stdout] 152 | let output = run_script_get_output(&script_lines, script_runner, cli_arguments, false, None); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `script_lines` [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/lib/command.rs:176:36 [INFO] [stdout] | [INFO] [stdout] 176 | let mut command = Command::new(&command_string); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `command_string` [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 can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib/command.rs:224:13 [INFO] [stdout] | [INFO] [stdout] 224 | Err(Error::new( [INFO] [stdout] | _____________^ [INFO] [stdout] 225 | | ErrorKind::Other, [INFO] [stdout] 226 | | "Shutting down - cannot run the command.", [INFO] [stdout] 227 | | ))?; [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] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 224 ~ Err(Error::other( [INFO] [stdout] 225 ~ "Shutting down - cannot run the command.", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/command.rs:270:41 [INFO] [stdout] | [INFO] [stdout] 270 | let output = run_command_get_output(&command_string, &args, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `command_string` [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/lib/command.rs:270:58 [INFO] [stdout] | [INFO] [stdout] 270 | let output = run_command_get_output(&command_string, &args, false); [INFO] [stdout] | ^^^^^ help: change this to: `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/lib/command.rs:286:41 [INFO] [stdout] | [INFO] [stdout] 286 | let output = run_command_get_output(&command_string, &args, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `command_string` [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/lib/command.rs:286:58 [INFO] [stdout] | [INFO] [stdout] 286 | let output = run_command_get_output(&command_string, &args, true); [INFO] [stdout] | ^^^^^ help: change this to: `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/lib/command.rs:311:45 [INFO] [stdout] | [INFO] [stdout] 311 | toolchain::wrap_command(&toolchain, &command_string, &step.config.args) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `toolchain` [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/lib/command.rs:311:57 [INFO] [stdout] | [INFO] [stdout] 311 | toolchain::wrap_command(&toolchain, &command_string, &step.config.args) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `command_string` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/condition_test.rs:5023:5 [INFO] [stdout] | [INFO] [stdout] 5023 | version.push_str("1"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `version.push('1')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/condition_test.rs:6074:5 [INFO] [stdout] | [INFO] [stdout] 6074 | version.push_str("1"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `version.push('1')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/lib/condition.rs:247:51 [INFO] [stdout] | [INFO] [stdout] 247 | ... .position(|value| *value == "stable".to_string()), [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: this creates an owned instance just for comparison [INFO] [stdout] --> src/lib/condition.rs:250:51 [INFO] [stdout] | [INFO] [stdout] 250 | ... .position(|value| *value == "beta".to_string()), [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] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/lib/condition.rs:253:51 [INFO] [stdout] | [INFO] [stdout] 253 | ... .position(|value| *value == "nightly".to_string()), [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] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `rustinfo.version` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/condition.rs:275:31 [INFO] [stdout] | [INFO] [stdout] 274 | if rustinfo.version.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = rustinfo.version` [INFO] [stdout] 275 | let current_version = rustinfo.version.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/condition.rs:320:31 [INFO] [stdout] | [INFO] [stdout] 320 | fn validate_files(file_paths: &Vec, exist: bool, validate_any: bool) -> bool { [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] 320 - fn validate_files(file_paths: &Vec, exist: bool, validate_any: bool) -> bool { [INFO] [stdout] 320 + fn validate_files(file_paths: &[String], exist: bool, validate_any: bool) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib/condition.rs:363:16 [INFO] [stdout] | [INFO] [stdout] 363 | if files_modified.input.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `files_modified.input.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/condition.rs:482:41 [INFO] [stdout] | [INFO] [stdout] 482 | let mut valid = validate_os(&condition_struct); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:491:39 [INFO] [stdout] | [INFO] [stdout] 491 | valid = validate_platform(&condition_struct); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:500:38 [INFO] [stdout] | [INFO] [stdout] 500 | valid = validate_profile(&condition_struct); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:509:38 [INFO] [stdout] | [INFO] [stdout] 509 | valid = validate_channel(&condition_struct, flow_info); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:518:34 [INFO] [stdout] | [INFO] [stdout] 518 | valid = validate_env(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:527:38 [INFO] [stdout] | [INFO] [stdout] 527 | valid = validate_env_not(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:536:38 [INFO] [stdout] | [INFO] [stdout] 536 | valid = validate_env_set(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:545:42 [INFO] [stdout] | [INFO] [stdout] 545 | valid = validate_env_not_set(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:554:39 [INFO] [stdout] | [INFO] [stdout] 554 | valid = validate_env_bool(&condition_struct, true, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:563:39 [INFO] [stdout] | [INFO] [stdout] 563 | valid = validate_env_bool(&condition_struct, false, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:572:43 [INFO] [stdout] | [INFO] [stdout] 572 | valid = validate_env_contains(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:581:43 [INFO] [stdout] | [INFO] [stdout] 581 | valid = validate_rust_version(&condition_struct); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:590:42 [INFO] [stdout] | [INFO] [stdout] 590 | valid = validate_files_exist(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:599:46 [INFO] [stdout] | [INFO] [stdout] 599 | valid = validate_files_not_exist(&condition_struct, validate_any); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:608:45 [INFO] [stdout] | [INFO] [stdout] 608 | valid = validate_files_modified(&condition_struct); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_struct` [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/lib/condition.rs:636:13 [INFO] [stdout] | [INFO] [stdout] 636 | / return scriptengine::invoke_script_pre_flow( [INFO] [stdout] 637 | | &ScriptValue::Text(script_text), [INFO] [stdout] 638 | | script_runner, [INFO] [stdout] 639 | | script_runner_args, [INFO] [stdout] ... | [INFO] [stdout] 642 | | &vec![], [INFO] [stdout] 643 | | ); [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] 636 ~ scriptengine::invoke_script_pre_flow( [INFO] [stdout] 637 + &ScriptValue::Text(script_text), [INFO] [stdout] 638 + script_runner, [INFO] [stdout] 639 + script_runner_args, [INFO] [stdout] 640 + None, [INFO] [stdout] 641 + false, [INFO] [stdout] 642 + &vec![], [INFO] [stdout] 643 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/condition.rs:665:50 [INFO] [stdout] | [INFO] [stdout] 665 | let criteria_passed = validate_criteria(Some(&flow_info), &condition); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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/lib/condition.rs:665:63 [INFO] [stdout] | [INFO] [stdout] 665 | let criteria_passed = validate_criteria(Some(&flow_info), &condition); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `condition` [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/lib/condition.rs:674:29 [INFO] [stdout] | [INFO] [stdout] 674 | validate_script(&condition_script, script_runner, script_runner_args) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `condition_script` [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/lib/condition.rs:684:9 [INFO] [stdout] | [INFO] [stdout] 684 | &flow_info, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `flow_info` [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: using `clone` on type `Option<&Task>` which implements the `Copy` trait [INFO] [stdout] --> src/lib/descriptor/mod_test.rs:377:13 [INFO] [stdout] | [INFO] [stdout] 377 | assert!(task.clone().unwrap().private.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `task` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/descriptor/mod_test.rs:1041:5 [INFO] [stdout] | [INFO] [stdout] 1041 | buffer.push_str("\""); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `buffer.push('"')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib/descriptor/descriptor_deserializer.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | / return Err(CargoMakeError::ParseFileFailed( [INFO] [stdout] 54 | | String::from(file), [INFO] [stdout] 55 | | error.to_string(), [INFO] [stdout] 56 | | )); [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] 53 ~ Err(CargoMakeError::ParseFileFailed( [INFO] [stdout] 54 + String::from(file), [INFO] [stdout] 55 + error.to_string(), [INFO] [stdout] 56 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:12:28 [INFO] [stdout] | [INFO] [stdout] 12 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 12 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 12 + let output = merge_env(&map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:12:39 [INFO] [stdout] | [INFO] [stdout] 12 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 12 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 12 + let output = merge_env(&mut map1, &map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:199:28 [INFO] [stdout] | [INFO] [stdout] 199 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 199 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 199 + let output = merge_env(&map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:199:39 [INFO] [stdout] | [INFO] [stdout] 199 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 199 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 199 + let output = merge_env(&mut map1, &map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | &EnvValue::Value(ref value_string) => assert_eq!( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 205 - &EnvValue::Value(ref value_string) => assert_eq!( [INFO] [stdout] 205 + EnvValue::Value(value_string) => assert_eq!( [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:220:28 [INFO] [stdout] | [INFO] [stdout] 220 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 220 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 220 + let output = merge_env(&map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:220:39 [INFO] [stdout] | [INFO] [stdout] 220 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 220 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 220 + let output = merge_env(&mut map1, &map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:224:9 [INFO] [stdout] | [INFO] [stdout] 224 | &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 224 - &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value".to_string()), [INFO] [stdout] 224 + EnvValue::Value(value_string) => assert_eq!(value_string, &"value".to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:236:28 [INFO] [stdout] | [INFO] [stdout] 236 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 236 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 236 + let output = merge_env(&map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:236:39 [INFO] [stdout] | [INFO] [stdout] 236 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 236 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 236 + let output = merge_env(&mut map1, &map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:240:9 [INFO] [stdout] | [INFO] [stdout] 240 | &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 240 - &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value".to_string()), [INFO] [stdout] 240 + EnvValue::Value(value_string) => assert_eq!(value_string, &"value".to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:255:28 [INFO] [stdout] | [INFO] [stdout] 255 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 255 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 255 + let output = merge_env(&map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:255:39 [INFO] [stdout] | [INFO] [stdout] 255 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 255 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 255 + let output = merge_env(&mut map1, &map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:259:9 [INFO] [stdout] | [INFO] [stdout] 259 | &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value1".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 259 - &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value1".to_string()), [INFO] [stdout] 259 + EnvValue::Value(value_string) => assert_eq!(value_string, &"value1".to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:264:9 [INFO] [stdout] | [INFO] [stdout] 264 | &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value21".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 264 - &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value21".to_string()), [INFO] [stdout] 264 + EnvValue::Value(value_string) => assert_eq!(value_string, &"value21".to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:269:9 [INFO] [stdout] | [INFO] [stdout] 269 | &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value22".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 269 - &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value22".to_string()), [INFO] [stdout] 269 + EnvValue::Value(value_string) => assert_eq!(value_string, &"value22".to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:308:28 [INFO] [stdout] | [INFO] [stdout] 308 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 308 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 308 + let output = merge_env(&map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:308:39 [INFO] [stdout] | [INFO] [stdout] 308 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 308 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 308 + let output = merge_env(&mut map1, &map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:312:9 [INFO] [stdout] | [INFO] [stdout] 312 | &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value1".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 312 - &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value1".to_string()), [INFO] [stdout] 312 + EnvValue::Value(value_string) => assert_eq!(value_string, &"value1".to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:317:9 [INFO] [stdout] | [INFO] [stdout] 317 | &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value21".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 317 - &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value21".to_string()), [INFO] [stdout] 317 + EnvValue::Value(value_string) => assert_eq!(value_string, &"value21".to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:322:9 [INFO] [stdout] | [INFO] [stdout] 322 | &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value22".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 322 - &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value22".to_string()), [INFO] [stdout] 322 + EnvValue::Value(value_string) => assert_eq!(value_string, &"value22".to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:331:17 [INFO] [stdout] | [INFO] [stdout] 331 | &EnvValue::Value(ref value_string) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 331 - &EnvValue::Value(ref value_string) => { [INFO] [stdout] 331 + EnvValue::Value(value_string) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:338:17 [INFO] [stdout] | [INFO] [stdout] 338 | &EnvValue::Value(ref value_string) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 338 - &EnvValue::Value(ref value_string) => { [INFO] [stdout] 338 + EnvValue::Value(value_string) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:345:17 [INFO] [stdout] | [INFO] [stdout] 345 | &EnvValue::Value(ref value_string) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 345 - &EnvValue::Value(ref value_string) => { [INFO] [stdout] 345 + EnvValue::Value(value_string) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:359:17 [INFO] [stdout] | [INFO] [stdout] 359 | &EnvValue::Value(ref value_string) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 359 - &EnvValue::Value(ref value_string) => { [INFO] [stdout] 359 + EnvValue::Value(value_string) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:385:28 [INFO] [stdout] | [INFO] [stdout] 385 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 385 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 385 + let output = merge_env(&map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:385:39 [INFO] [stdout] | [INFO] [stdout] 385 | let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 385 - let output = merge_env(&mut map1, &mut map2).expect("should have no cycle"); [INFO] [stdout] 385 + let output = merge_env(&mut map1, &map2).expect("should have no cycle"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:389:9 [INFO] [stdout] | [INFO] [stdout] 389 | &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value2".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 389 - &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"value2".to_string()), [INFO] [stdout] 389 + EnvValue::Value(value_string) => assert_eq!(value_string, &"value2".to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/lib/descriptor/env_test.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"test1".to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 394 - &EnvValue::Value(ref value_string) => assert_eq!(value_string, &"test1".to_string()), [INFO] [stdout] 394 + EnvValue::Value(value_string) => assert_eq!(value_string, &"test1".to_string()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/lib/descriptor/env.rs:24:35 [INFO] [stdout] | [INFO] [stdout] 24 | for (key, val) in vals.iter().map(|map| map.iter()).flatten().rev() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|map| map.iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/descriptor/env.rs:146:42 [INFO] [stdout] | [INFO] [stdout] 146 | let is_external = envmnt::exists(&key); [INFO] [stdout] | ^^^^ help: change this to: `key` [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: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/lib/descriptor/env.rs:193:35 [INFO] [stdout] | [INFO] [stdout] 193 | if let Some((key, val)) = combined [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 194 | | .iter() [INFO] [stdout] 195 | | .filter(|(key, _)| *key == name) [INFO] [stdout] 196 | | .last() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 196 - .last() [INFO] [stdout] 196 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/descriptor/env.rs:217:11 [INFO] [stdout] | [INFO] [stdout] 217 | base: &mut 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] 217 - base: &mut Vec, [INFO] [stdout] 217 + base: &mut [EnvFile], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/descriptor/env.rs:218:15 [INFO] [stdout] | [INFO] [stdout] 218 | extended: &mut 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] 218 - extended: &mut Vec, [INFO] [stdout] 218 + extended: &mut [EnvFile], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/descriptor/env.rs:223:39 [INFO] [stdout] | [INFO] [stdout] 223 | pub(crate) fn merge_env_scripts(base: &mut Vec, extended: &mut 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] 223 - pub(crate) fn merge_env_scripts(base: &mut Vec, extended: &mut Vec) -> Vec { [INFO] [stdout] 223 + pub(crate) fn merge_env_scripts(base: &mut [String], extended: &mut Vec) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib/descriptor/env.rs:223:67 [INFO] [stdout] | [INFO] [stdout] 223 | pub(crate) fn merge_env_scripts(base: &mut Vec, extended: &mut 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] 223 - pub(crate) fn merge_env_scripts(base: &mut Vec, extended: &mut Vec) -> Vec { [INFO] [stdout] 223 + pub(crate) fn merge_env_scripts(base: &mut Vec, extended: &mut [String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lib/descriptor/makefiles/mod_test.rs:124:19 [INFO] [stdout] | [INFO] [stdout] 124 | let enabled = if test::is_windows() { false } else { true }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `!test::is_windows()` [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/lib/descriptor/mod.rs:65:33 [INFO] [stdout] | [INFO] [stdout] 65 | let clear = task.clear.clone().unwrap_or(false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `task.clear` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/lib/descriptor/mod.rs:57:18 [INFO] [stdout] | [INFO] [stdout] 57 | Some(ref value) => { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 57 - Some(ref value) => { [INFO] [stdout] 57 + Some(value) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/descriptor/mod.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | / match external_config.env_files { [INFO] [stdout] 99 | | Some(env_files) => { [INFO] [stdout] 100 | | let mut modified_env_files = vec![]; [INFO] [stdout] ... | [INFO] [stdout] 122 | | None => (), [INFO] [stdout] 123 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 98 ~ if let Some(env_files) = external_config.env_files { [INFO] [stdout] 99 + let mut modified_env_files = vec![]; [INFO] [stdout] 100 + [INFO] [stdout] 101 + for env_file in env_files { [INFO] [stdout] 102 + match env_file { [INFO] [stdout] 103 + EnvFile::Path(path) => { [INFO] [stdout] 104 + let mut info = EnvFileInfo::new(path); [INFO] [stdout] 105 + info.base_path = Some(base_directory.clone()); [INFO] [stdout] 106 + [INFO] [stdout] 107 + modified_env_files.push(EnvFile::Info(info)); [INFO] [stdout] 108 + } [INFO] [stdout] 109 + EnvFile::Info(mut info) => { [INFO] [stdout] 110 + if info.base_path.is_none() { [INFO] [stdout] 111 + info.base_path = Some(base_directory.clone()); [INFO] [stdout] 112 + } [INFO] [stdout] 113 + [INFO] [stdout] 114 + modified_env_files.push(EnvFile::Info(info)); [INFO] [stdout] 115 + } [INFO] [stdout] 116 + } [INFO] [stdout] 117 + } [INFO] [stdout] 118 + [INFO] [stdout] 119 + external_config.env_files = Some(modified_env_files); [INFO] [stdout] 120 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `parent_config.config` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/descriptor/mod.rs:229:39 [INFO] [stdout] | [INFO] [stdout] 228 | if parent_config.config.is_some() { [INFO] [stdout] | --------------------------------- help: try: `if let Some() = parent_config.config` [INFO] [stdout] 229 | let mut config_section_data = parent_config.config.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: called `unwrap` on `config.config` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/descriptor/mod.rs:234:39 [INFO] [stdout] | [INFO] [stdout] 233 | if config.config.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = config.config` [INFO] [stdout] 234 | let mut config_section_data = config.config.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/descriptor/mod.rs:184:32 [INFO] [stdout] | [INFO] [stdout] 184 | let mut parent_env_files = match parent_config.env_files { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 185 | | Some(env_files) => env_files, [INFO] [stdout] 186 | | None => vec![], [INFO] [stdout] 187 | | }; [INFO] [stdout] | |_____^ help: replace it with: `parent_config.env_files.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/descriptor/mod.rs:188:34 [INFO] [stdout] | [INFO] [stdout] 188 | let mut extended_env_files = match config.env_files { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 189 | | Some(env_files) => env_files, [INFO] [stdout] 190 | | None => vec![], [INFO] [stdout] 191 | | }; [INFO] [stdout] | |_____^ help: replace it with: `config.env_files.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/mod.rs:203:29 [INFO] [stdout] | [INFO] [stdout] 203 | let all_env = merge_env(&mut parent_env, &mut extended_env)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 203 - let all_env = merge_env(&mut parent_env, &mut extended_env)?; [INFO] [stdout] 203 + let all_env = merge_env(&parent_env, &mut extended_env)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/mod.rs:203:46 [INFO] [stdout] | [INFO] [stdout] 203 | let all_env = merge_env(&mut parent_env, &mut extended_env)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 203 - let all_env = merge_env(&mut parent_env, &mut extended_env)?; [INFO] [stdout] 203 + let all_env = merge_env(&mut parent_env, &extended_env)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/descriptor/mod.rs:206:34 [INFO] [stdout] | [INFO] [stdout] 206 | let mut parent_env_scripts = match parent_config.env_scripts { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 207 | | Some(env_scripts) => env_scripts, [INFO] [stdout] 208 | | None => vec![], [INFO] [stdout] 209 | | }; [INFO] [stdout] | |_____^ help: replace it with: `parent_config.env_scripts.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/descriptor/mod.rs:210:36 [INFO] [stdout] | [INFO] [stdout] 210 | let mut extended_env_scripts = match config.env_scripts { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 211 | | Some(env_scripts) => env_scripts, [INFO] [stdout] 212 | | None => vec![], [INFO] [stdout] 213 | | }; [INFO] [stdout] | |_____^ help: replace it with: `config.env_scripts.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/descriptor/mod.rs:260:51 [INFO] [stdout] | [INFO] [stdout] 260 | load_external_descriptor(parent_path, &base_file, true, false, RelativeTo::Makefile) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `base_file` [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/lib/descriptor/mod.rs:305:51 [INFO] [stdout] | [INFO] [stdout] 305 | let value: toml::Value = match toml::from_str(&external_descriptor) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `external_descriptor` [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/lib/descriptor/mod.rs:318:36 [INFO] [stdout] | [INFO] [stdout] 318 | if version::is_newer_found(&min_version) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `min_version` [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/lib/descriptor/mod.rs:407:56 [INFO] [stdout] | [INFO] [stdout] 407 | load_descriptor_extended_makefiles(&parent_path, extend_struct)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `parent_path` [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/lib/descriptor/mod.rs:439:64 [INFO] [stdout] | [INFO] [stdout] 439 | let mut base_config = descriptor_deserializer::load_config(&base_descriptor, false)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `base_descriptor` [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/lib/descriptor/mod.rs:447:50 [INFO] [stdout] | [INFO] [stdout] 447 | descriptor_deserializer::load_config(&experimental_descriptor, false)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `experimental_descriptor` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/descriptor/mod.rs:461:5 [INFO] [stdout] | [INFO] [stdout] 461 | / match modify_config { [INFO] [stdout] 462 | | Some(props) => { [INFO] [stdout] 463 | | base_config.apply(&props); [INFO] [stdout] ... | [INFO] [stdout] 475 | | None => (), [INFO] [stdout] 476 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 461 ~ if let Some(props) = modify_config { [INFO] [stdout] 462 + base_config.apply(&props); [INFO] [stdout] 463 + [INFO] [stdout] 464 + match props.namespace { [INFO] [stdout] 465 + Some(ref namespace) => { [INFO] [stdout] 466 + let prefix = props.get_namespace_prefix(); [INFO] [stdout] 467 + [INFO] [stdout] 468 + envmnt::set("CARGO_MAKE_CORE_TASK_NAMESPACE", &namespace); [INFO] [stdout] 469 + envmnt::set("CARGO_MAKE_CORE_TASK_NAMESPACE_PREFIX", &prefix); [INFO] [stdout] 470 + } [INFO] [stdout] 471 + None => (), [INFO] [stdout] 472 + }; [INFO] [stdout] 473 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/descriptor/mod.rs:465:13 [INFO] [stdout] | [INFO] [stdout] 465 | / match props.namespace { [INFO] [stdout] 466 | | Some(ref namespace) => { [INFO] [stdout] 467 | | let prefix = props.get_namespace_prefix(); [INFO] [stdout] ... | [INFO] [stdout] 472 | | None => (), [INFO] [stdout] 473 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 465 ~ if let Some(ref namespace) = props.namespace { [INFO] [stdout] 466 + let prefix = props.get_namespace_prefix(); [INFO] [stdout] 467 + [INFO] [stdout] 468 + envmnt::set("CARGO_MAKE_CORE_TASK_NAMESPACE", &namespace); [INFO] [stdout] 469 + envmnt::set("CARGO_MAKE_CORE_TASK_NAMESPACE_PREFIX", &prefix); [INFO] [stdout] 470 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/descriptor/mod.rs:469:67 [INFO] [stdout] | [INFO] [stdout] 469 | envmnt::set("CARGO_MAKE_CORE_TASK_NAMESPACE", &namespace); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `namespace` [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: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/descriptor/mod.rs:493:21 [INFO] [stdout] | [INFO] [stdout] 493 | let env_files = match external_config.env_files { [INFO] [stdout] | _____________________^ [INFO] [stdout] 494 | | Some(env_files) => env_files, [INFO] [stdout] 495 | | None => vec![], [INFO] [stdout] 496 | | }; [INFO] [stdout] | |_____^ help: replace it with: `external_config.env_files.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/lib/descriptor/mod.rs:498:23 [INFO] [stdout] | [INFO] [stdout] 498 | let env_scripts = match external_config.env_scripts { [INFO] [stdout] | _______________________^ [INFO] [stdout] 499 | | Some(env_scripts) => env_scripts, [INFO] [stdout] 500 | | None => vec![], [INFO] [stdout] 501 | | }; [INFO] [stdout] | |_____^ help: replace it with: `external_config.env_scripts.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/mod.rs:510:33 [INFO] [stdout] | [INFO] [stdout] 510 | let mut all_env = merge_env(&mut base_env, &mut external_env)?; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 510 - let mut all_env = merge_env(&mut base_env, &mut external_env)?; [INFO] [stdout] 510 + let mut all_env = merge_env(&base_env, &mut external_env)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `merge_env` doesn't need a mutable reference [INFO] [stdout] --> src/lib/descriptor/mod.rs:510:48 [INFO] [stdout] | [INFO] [stdout] 510 | let mut all_env = merge_env(&mut base_env, &mut external_env)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 510 - let mut all_env = merge_env(&mut base_env, &mut external_env)?; [INFO] [stdout] 510 + let mut all_env = merge_env(&mut base_env, &external_env)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/lib/descriptor/mod.rs:541:55 [INFO] [stdout] | [INFO] [stdout] 541 | config_section.extend(&mut external_config.config.unwrap_or(ConfigSection::new())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `split_once` [INFO] [stdout] --> src/lib/descriptor/mod.rs:558:5 [INFO] [stdout] | [INFO] [stdout] 558 | let mut parts = value.splitn(2, delimiter); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 559 | let part1 = parts.next()?; [INFO] [stdout] | -------------------------- first usage here [INFO] [stdout] 560 | let part2 = parts.next()?; [INFO] [stdout] | -------------------------- second usage here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once [INFO] [stdout] = note: `#[warn(clippy::manual_split_once)]` on by default [INFO] [stdout] help: replace with `split_once` [INFO] [stdout] | [INFO] [stdout] 558 ~ let (part1, part2) = value.split_once(delimiter)?; [INFO] [stdout] 559 ~ [INFO] [stdout] 560 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/descriptor/mod.rs:654:39 [INFO] [stdout] | [INFO] [stdout] 654 | let mut config = load_descriptors(&file_name, force, env_map.clone(), false, false, None)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/lib/descriptor/mod.rs:665:25 [INFO] [stdout] | [INFO] [stdout] 665 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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: length comparison to zero [INFO] [stdout] --> src/lib/environment/crateinfo_test.rs:424:13 [INFO] [stdout] | [INFO] [stdout] 424 | assert!(members.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!members.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: length comparison to zero [INFO] [stdout] --> src/lib/environment/crateinfo_test.rs:432:13 [INFO] [stdout] | [INFO] [stdout] 432 | assert!(members.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!members.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: length comparison to zero [INFO] [stdout] --> src/lib/environment/crateinfo_test.rs:440:13 [INFO] [stdout] | [INFO] [stdout] 440 | assert!(members.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!members.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:78:17 [INFO] [stdout] | [INFO] [stdout] 78 | / match entry { [INFO] [stdout] 79 | | Ok(path) => { [INFO] [stdout] 80 | | let should_add = if emulation { [INFO] [stdout] ... | [INFO] [stdout] 99 | | _ => (), [INFO] [stdout] 100 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 78 ~ if let Ok(path) = entry { [INFO] [stdout] 79 + let should_add = if emulation { [INFO] [stdout] 80 + // emulation may be used for non rust projects [INFO] [stdout] 81 + // so no extra validations [INFO] [stdout] 82 + true [INFO] [stdout] 83 + } else { [INFO] [stdout] 84 + // ensure Cargo.toml is found [INFO] [stdout] 85 + let mut cargo_path = path.clone(); [INFO] [stdout] 86 + cargo_path.push("Cargo.toml"); [INFO] [stdout] 87 + let exists = cargo_path.exists(); [INFO] [stdout] 88 + [INFO] [stdout] 89 + exists [INFO] [stdout] 90 + }; [INFO] [stdout] 91 + [INFO] [stdout] 92 + if should_add { [INFO] [stdout] 93 + let mut updated_path = path.to_str().unwrap().to_string(); [INFO] [stdout] 94 + updated_path = updated_path.replace("\\", "/"); [INFO] [stdout] 95 + members.push(updated_path); [INFO] [stdout] 96 + } [INFO] [stdout] 97 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lib/environment/crateinfo.rs:90:29 [INFO] [stdout] | [INFO] [stdout] 88 | ... let exists = cargo_path.exists(); [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 89 | ... [INFO] [stdout] 90 | ... exists [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 88 ~ [INFO] [stdout] 89 | [INFO] [stdout] 90 ~ cargo_path.exists() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib/environment/crateinfo.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | / match crate_info.workspace { [INFO] [stdout] 111 | | Some(ref mut workspace) => { [INFO] [stdout] 112 | | if let Some(ref mut members) = workspace.members { [INFO] [stdout] 113 | | let existing_members = members.clone(); [INFO] [stdout] ... | [INFO] [stdout] 129 | | None => (), //not a workspace [INFO] [stdout] 130 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 110 ~ if let Some(ref mut workspace) = crate_info.workspace { [INFO] [stdout] 111 + if let Some(ref mut members) = workspace.members { [INFO] [stdout] 112 + let existing_members = members.clone(); [INFO] [stdout] 113 + [INFO] [stdout] 114 + let mut index = 0; [INFO] [stdout] 115 + for member in existing_members.iter() { [INFO] [stdout] 116 + // glob [INFO] [stdout] 117 + if member.contains("*") { [INFO] [stdout] 118 + let mut expanded_members = expand_glob_members(&member); [INFO] [stdout] 119 + [INFO] [stdout] 120 + members.remove(index); [INFO] [stdout] 121 + members.append(&mut expanded_members); [INFO] [stdout] 122 + } else { [INFO] [stdout] 123 + index = index + 1; [INFO] [stdout] 124 + } [INFO] [stdout] 125 + } [INFO] [stdout] 126 + } [INFO] [stdout] 127 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/environment/crateinfo.rs:119:72 [INFO] [stdout] | [INFO] [stdout] 119 | let mut expanded_members = expand_glob_members(&member); [INFO] [stdout] | ^^^^^^^ help: change this to: `member` [INFO] [stdout] | [WARN] too many lines in the log, truncating it