[INFO] fetching crate tmplgen 1.3.1... [INFO] linting tmplgen-1.3.1 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate tmplgen 1.3.1 into /workspace/builds/worker-6-tc1/source [INFO] started tweaking crates.io crate tmplgen 1.3.1 [INFO] finished tweaking crates.io crate tmplgen 1.3.1 [INFO] tweaked toml for crates.io crate tmplgen 1.3.1 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate tmplgen 1.3.1 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Locking 315 packages to latest compatible versions [INFO] [stderr] Adding assert_cmd v0.11.1 (available: v2.2.0) [INFO] [stderr] Adding clap v2.34.0 (available: v4.6.0) [INFO] [stderr] Adding crates_io_api v0.4.1 (available: v0.12.0) [INFO] [stderr] Adding criterion v0.2.11 (available: v0.8.2) [INFO] [stderr] Adding env_logger v0.6.2 (available: v0.11.9) [INFO] [stderr] Adding git2 v0.8.0 (available: v0.20.4) [INFO] [stderr] Adding indicatif v0.11.0 (available: v0.18.4) [INFO] [stderr] Adding reqwest v0.9.24 (available: v0.13.2) [INFO] [stderr] Adding retry v0.4.0 (available: v2.2.0) [INFO] [stderr] Adding sha2 v0.8.2 (available: v0.10.9) [INFO] [stderr] Adding toml v0.4.10 (available: v1.0.7+spec-1.1.0) [INFO] [stderr] Adding wasi v0.10.0+wasi-snapshot-preview1 (available: v0.10.2+wasi-snapshot-preview1) [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] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded libssh2-sys v0.2.23 [INFO] [stderr] Downloaded escargot v0.4.0 [INFO] [stderr] Downloaded number_prefix v0.2.8 [INFO] [stderr] Downloaded indicatif v0.11.0 [INFO] [stderr] Downloaded git2 v0.8.0 [INFO] [stderr] Downloaded predicates v1.0.8 [INFO] [stderr] Downloaded crates_io_api v0.4.1 [INFO] [stderr] Downloaded retry v0.4.0 [INFO] [stderr] Downloaded rubygems_api v0.3.0 [INFO] [stderr] Downloaded metacpan_api v0.5.0 [INFO] [stderr] Downloaded assert_cmd v0.11.1 [INFO] [stderr] Downloaded libgit2-sys v0.7.11 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] f2c7416921a08e5edcb8bc7a0260d470e18ac79afc822aa025d641646790c089 [INFO] running `Command { std: "docker" "start" "-a" "f2c7416921a08e5edcb8bc7a0260d470e18ac79afc822aa025d641646790c089", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f2c7416921a08e5edcb8bc7a0260d470e18ac79afc822aa025d641646790c089", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f2c7416921a08e5edcb8bc7a0260d470e18ac79afc822aa025d641646790c089", kill_on_drop: false }` [INFO] [stdout] f2c7416921a08e5edcb8bc7a0260d470e18ac79afc822aa025d641646790c089 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 37d8bf5ad230b7e598f5949ac611340ee5ca4a38d42f9b871f27c1ae6c406cbc [INFO] running `Command { std: "docker" "start" "-a" "37d8bf5ad230b7e598f5949ac611340ee5ca4a38d42f9b871f27c1ae6c406cbc", kill_on_drop: false }` [INFO] [stderr] Checking mio v0.6.23 [INFO] [stderr] Checking tokio-io v0.1.13 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Compiling libz-sys v1.1.25 [INFO] [stderr] Checking tokio-threadpool v0.1.18 [INFO] [stderr] Checking object v0.37.3 [INFO] [stderr] Checking want v0.2.0 [INFO] [stderr] Checking openssl v0.10.76 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Compiling curl-sys v0.4.86+curl-8.19.0 [INFO] [stderr] Compiling libssh2-sys v0.2.23 [INFO] [stderr] Compiling libgit2-sys v0.7.11 [INFO] [stderr] Checking byte-tools v0.3.1 [INFO] [stderr] Checking rand v0.4.6 [INFO] [stderr] Checking yaml-rust v0.3.5 [INFO] [stderr] Checking block-padding v0.1.5 [INFO] [stderr] Checking console v0.16.3 [INFO] [stderr] Checking digest v0.8.1 [INFO] [stderr] Checking number_prefix v0.2.8 [INFO] [stderr] Checking block-buffer v0.7.3 [INFO] [stderr] Checking opaque-debug v0.2.3 [INFO] [stderr] Checking predicates-core v1.0.10 [INFO] [stderr] Checking fake-simd v0.1.2 [INFO] [stderr] Compiling tmplgen v1.3.1 (/opt/rustwide/workdir) [INFO] [stderr] Compiling escargot v0.4.0 [INFO] [stderr] Checking tokio-codec v0.1.2 [INFO] [stderr] Checking tokio-fs v0.1.7 [INFO] [stderr] Checking h2 v0.1.26 [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> build.rs:38:10 [INFO] [stdout] | [INFO] [stdout] 38 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] = note: `#[warn(clippy::suspicious_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking sha2 v0.8.2 [INFO] [stderr] Checking clap v2.34.0 [INFO] [stderr] Checking serde_urlencoded v0.5.5 [INFO] [stderr] Checking chrono v0.4.44 [INFO] [stderr] Checking toml v0.4.10 [INFO] [stderr] Checking env_logger v0.6.2 [INFO] [stderr] Checking tokio-reactor v0.1.12 [INFO] [stderr] Checking mio-uds v0.6.8 [INFO] [stderr] Checking rand v0.3.23 [INFO] [stderr] Checking csv-core v0.1.13 [INFO] [stderr] Checking retry v0.4.0 [INFO] [stderr] Compiling cargo-husky v1.5.0 [INFO] [stderr] Checking difference v2.0.0 [INFO] [stderr] Checking termtree v0.5.1 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking csv v1.4.0 [INFO] [stderr] Checking predicates v1.0.8 [INFO] [stderr] Checking indicatif v0.11.0 [INFO] [stderr] Checking predicates-tree v1.0.13 [INFO] [stderr] Checking tokio-tcp v0.1.4 [INFO] [stderr] Checking tokio-uds v0.2.7 [INFO] [stderr] Checking tokio-udp v0.1.6 [INFO] [stderr] Checking publicsuffix v1.5.6 [INFO] [stderr] Checking tokio v0.1.22 [INFO] [stderr] Checking criterion v0.2.11 [INFO] [stderr] Checking assert_cmd v0.11.1 [INFO] [stderr] Checking hyper v0.12.36 [INFO] [stderr] Checking native-tls v0.2.18 [INFO] [stderr] Checking hyper-tls v0.3.2 [INFO] [stderr] Checking backtrace v0.3.76 [INFO] [stderr] Checking failure v0.1.8 [INFO] [stderr] Checking cookie_store v0.7.0 [INFO] [stderr] Checking reqwest v0.9.24 [INFO] [stderr] Checking crates_io_api v0.4.1 [INFO] [stderr] Checking rubygems_api v0.3.0 [INFO] [stderr] Checking metacpan_api v0.5.0 [INFO] [stderr] Checking git2 v0.8.0 [INFO] [stdout] warning: unused import: `crate::tmplwriter::*` [INFO] [stdout] --> src/lib/lib.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | pub use crate::tmplwriter::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::tmplwriter::*` [INFO] [stdout] --> src/lib/lib.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | pub use crate::tmplwriter::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) 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/crates.rs:111:46 [INFO] [stdout] | [INFO] [stdout] 111 | Ok(client.crate_dependencies(crate_name, &latest_version)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `latest_version` [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/gems.rs:50:40 [INFO] [stdout] | [INFO] [stdout] 50 | .map(|x| parse_gem_version_req(&x)) [INFO] [stdout] | ^^ help: change this to: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/lib/gems.rs:62:46 [INFO] [stdout] | [INFO] [stdout] 62 | pkg_name: format!("ruby-{}", gem_name.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: this boolean expression can be simplified [INFO] [stdout] --> src/lib/helpers.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | if (crate_status && gem_status) [INFO] [stdout] | ________^ [INFO] [stdout] 46 | | || (crate_status && perldist_status) [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 45 - if (crate_status && gem_status) [INFO] [stdout] 46 - || (crate_status && perldist_status) [INFO] [stdout] 45 + if !(!crate_status || !gem_status && !perldist_status) [INFO] [stdout] | [INFO] [stdout] 45 - if (crate_status && gem_status) [INFO] [stdout] 46 - || (crate_status && perldist_status) [INFO] [stdout] 45 + if (perldist_status || gem_status) && crate_status [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/helpers.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | .get_crate(&pkg_name) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkg_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/helpers.rs:41:63 [INFO] [stdout] | [INFO] [stdout] 41 | let gem_status = rubygems_api::SyncClient::new().gem_info(&pkg_name).is_ok(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkg_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/helpers.rs:43:69 [INFO] [stdout] | [INFO] [stdout] 43 | let perldist_status = metacpan_api::SyncClient::new().perl_info(&pkg_name).is_ok(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkg_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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/lib/helpers.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | / (&format!("{} on the platforms {:?}", pkg_name, found_platforms) [INFO] [stdout] 62 | | .replace("[", "") [INFO] [stdout] 63 | | .replace("]", "")) [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: change this to [INFO] [stdout] | [INFO] [stdout] 61 ~ format!("{} on the platforms {:?}", pkg_name, found_platforms) [INFO] [stdout] 62 + .replace("[", "") [INFO] [stdout] 63 + .replace("]", "") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/helpers.rs:112:13 [INFO] [stdout] | [INFO] [stdout] 112 | dep_string.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `dep_string.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/helpers.rs:157:20 [INFO] [stdout] | [INFO] [stdout] 157 | crate_info(&pkg_name) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkg_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/helpers.rs:159:23 [INFO] [stdout] | [INFO] [stdout] 159 | perldist_info(&pkg_name) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkg_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: called `unwrap` on `git_author_env` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/helpers.rs:178:13 [INFO] [stdout] | [INFO] [stdout] 176 | let git_details = if git_author_env.is_some() && git_email_env.is_some() { [INFO] [stdout] | ------------------------ the check is happening here [INFO] [stdout] 177 | ( [INFO] [stdout] 178 | git_author_env.unwrap().to_str().unwrap().to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `git_email_env` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/helpers.rs:179:13 [INFO] [stdout] | [INFO] [stdout] 176 | let git_details = if git_author_env.is_some() && git_email_env.is_some() { [INFO] [stdout] | ----------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 179 | git_email_env.unwrap().to_str().unwrap().to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `hash_res` after checking its variant with `is_err` [INFO] [stdout] --> src/lib/helpers.rs:263:31 [INFO] [stdout] | [INFO] [stdout] 262 | if hash_res.is_err() { [INFO] [stdout] | -------------------- help: try: `if let Err() = hash_res` [INFO] [stdout] 263 | return Err(Error::Sha(hash_res.unwrap_err().to_string())); [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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/lib/helpers.rs:216:24 [INFO] [stdout] | [INFO] [stdout] 216 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/perldist.rs:33:41 [INFO] [stdout] | [INFO] [stdout] 33 | let query_result = client.perl_info(&perldist_name); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `perldist_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/perldist.rs:46:63 [INFO] [stdout] | [INFO] [stdout] 46 | &mut || client.perl_info(&client.get_dist(&perldist_name)?), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `perldist_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/perldist.rs:58:46 [INFO] [stdout] | [INFO] [stdout] 58 | &mut || client.perl_info(&perldist_name), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `perldist_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: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/perldist.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | &query_result.version.as_str().unwrap_or_default(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `query_result.version.as_str().unwrap_or_default()` [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: called `unwrap` on `self.pkg_type` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:98:16 [INFO] [stdout] | [INFO] [stdout] 90 | if self.pkg_type.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = self.pkg_type` [INFO] [stdout] ... [INFO] [stdout] 98 | if self.pkg_type.unwrap() == PkgType::Gem { [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 `self.pkg_type` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:108:23 [INFO] [stdout] | [INFO] [stdout] 90 | if self.pkg_type.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = self.pkg_type` [INFO] [stdout] ... [INFO] [stdout] 108 | } else if self.pkg_type.unwrap() == PkgType::PerlDist { [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 `self.pkg_info` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:147:24 [INFO] [stdout] | [INFO] [stdout] 146 | if self.pkg_info.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = &self.pkg_info` [INFO] [stdout] 147 | let deps = self [INFO] [stdout] | ________________________^ [INFO] [stdout] 148 | | .pkg_info [INFO] [stdout] 149 | | .as_ref() [INFO] [stdout] 150 | | .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 boolean expression can be simplified [INFO] [stdout] --> src/lib/tmplwriter.rs:318:12 [INFO] [stdout] | [INFO] [stdout] 318 | if !(orig_ver_string == format!("version={}", &pkg_info.version)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(orig_ver_string != format!("version={}", &pkg_info.version))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.pkg_info` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:281:16 [INFO] [stdout] | [INFO] [stdout] 280 | let pkg_info = if self.pkg_info.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = &self.pkg_info` [INFO] [stdout] 281 | Ok(self.pkg_info.as_ref().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: unnecessary map of the identity function [INFO] [stdout] --> src/lib/tmplwriter.rs:304:52 [INFO] [stdout] | [INFO] [stdout] 304 | .filter(|x| x.contains(search_str)) [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 305 | | .map(|x| x) [INFO] [stdout] | |___________________________^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/lib/tmplwriter.rs:347:22 [INFO] [stdout] | [INFO] [stdout] 347 | &format!( [INFO] [stdout] | ______________________^ [INFO] [stdout] 348 | | "distfiles=\"{}", [INFO] [stdout] 349 | | format!( [INFO] [stdout] 350 | | "{}\"", [INFO] [stdout] ... | [INFO] [stdout] 356 | | ), [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.pkg_info` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:445:16 [INFO] [stdout] | [INFO] [stdout] 444 | let pkg_info = if self.pkg_info.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = &self.pkg_info` [INFO] [stdout] 445 | Ok(self.pkg_info.as_ref().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 `pkg_info.description` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:469:18 [INFO] [stdout] | [INFO] [stdout] 466 | if pkg_info.description.is_some() { [INFO] [stdout] | --------------------------------- help: try: `if let Some() = &pkg_info.description` [INFO] [stdout] ... [INFO] [stdout] 469 | &pkg_info.description.as_ref().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 `pkg_info.license` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:485:32 [INFO] [stdout] | [INFO] [stdout] 484 | if pkg_info.license.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = &pkg_info.license` [INFO] [stdout] 485 | let license_iter = pkg_info.license.as_ref().unwrap().par_iter(); [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 `pkg_info.dependencies` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:505:32 [INFO] [stdout] | [INFO] [stdout] 504 | if pkg_info.dependencies.is_some() { [INFO] [stdout] | ---------------------------------- help: try: `if let Some() = &pkg_info.dependencies` [INFO] [stdout] 505 | let dependencies = pkg_info.dependencies.as_ref().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 `dependencies.host` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:508:51 [INFO] [stdout] | [INFO] [stdout] 507 | if dependencies.host.is_some() { [INFO] [stdout] | ------------------------------ help: try: `if let Some() = &dependencies.host` [INFO] [stdout] 508 | let host_depends = gen_dep_string(dependencies.host.as_ref().unwrap(), tmpl_type); [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 `dependencies.make` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:516:51 [INFO] [stdout] | [INFO] [stdout] 515 | if dependencies.make.is_some() { [INFO] [stdout] | ------------------------------ help: try: `if let Some() = &dependencies.make` [INFO] [stdout] 516 | let make_depends = gen_dep_string(dependencies.make.as_ref().unwrap(), tmpl_type); [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 `dependencies.run` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:523:50 [INFO] [stdout] | [INFO] [stdout] 522 | if dependencies.run.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = &dependencies.run` [INFO] [stdout] 523 | let run_depends = gen_dep_string(dependencies.run.as_ref().unwrap(), tmpl_type); [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 `pkg_info.download_url` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:537:57 [INFO] [stdout] | [INFO] [stdout] 535 | if pkg_info.download_url.is_some() { [INFO] [stdout] | ---------------------------------- help: try: `if let Some() = &pkg_info.download_url` [INFO] [stdout] 536 | template_string = [INFO] [stdout] 537 | template_string.replace("@distfiles@", &pkg_info.download_url.as_ref().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/tmplwriter.rs:469:17 [INFO] [stdout] | [INFO] [stdout] 469 | &pkg_info.description.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `pkg_info.description.as_ref().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/tmplwriter.rs:510:66 [INFO] [stdout] | [INFO] [stdout] 510 | template_string.replace("@hostmakedepends@", &host_depends.trim_end()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `host_depends.trim_end()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#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/tmplwriter.rs:518:62 [INFO] [stdout] | [INFO] [stdout] 518 | template_string.replace("@makedepends@", &make_depends.trim_end()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `make_depends.trim_end()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#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/tmplwriter.rs:524:72 [INFO] [stdout] | [INFO] [stdout] 524 | template_string = template_string.replace("@depends@", &run_depends.trim_end()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `run_depends.trim_end()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#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/tmplwriter.rs:537:56 [INFO] [stdout] | [INFO] [stdout] 537 | template_string.replace("@distfiles@", &pkg_info.download_url.as_ref().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `pkg_info.download_url.as_ref().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/tmplwriter.rs:583:9 [INFO] [stdout] | [INFO] [stdout] 583 | template_string.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `template_string.push('\n')` [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: using `map` over `inspect` [INFO] [stdout] --> src/lib/types.rs:73:30 [INFO] [stdout] | [INFO] [stdout] 73 | self.inner.read(buf).map(|n| { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 73 ~ self.inner.read(buf).inspect(|&n| { [INFO] [stdout] 74 ~ self.progress_bar.inc(n as u64); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/lib/errors.rs:4:62 [INFO] [stdout] | [INFO] [stdout] 4 | #[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Fail)] [INFO] [stdout] | ^--- [INFO] [stdout] | | [INFO] [stdout] | `Fail` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_DERIVE_failure_Fail_FOR_Error` [INFO] [stdout] 5 | pub enum Error { [INFO] [stdout] | ----- `Error` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Fail` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Fail` may come from an old version of the `failure_derive` crate, try updating your dependency with `cargo update -p failure_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Fail` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/lib/errors.rs:4:62 [INFO] [stdout] | [INFO] [stdout] 4 | #[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Fail)] [INFO] [stdout] | ^--- [INFO] [stdout] | | [INFO] [stdout] | `Display` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_DERIVE_failure_core_fmt_Display_FOR_Error` [INFO] [stdout] 5 | pub enum Error { [INFO] [stdout] | ----- `Error` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Fail` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Fail` may come from an old version of the `failure_derive` crate, try updating your dependency with `cargo update -p failure_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Fail` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/crates.rs:111:46 [INFO] [stdout] | [INFO] [stdout] 111 | Ok(client.crate_dependencies(crate_name, &latest_version)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `latest_version` [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/gems.rs:50:40 [INFO] [stdout] | [INFO] [stdout] 50 | .map(|x| parse_gem_version_req(&x)) [INFO] [stdout] | ^^ help: change this to: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/lib/gems.rs:62:46 [INFO] [stdout] | [INFO] [stdout] 62 | pkg_name: format!("ruby-{}", gem_name.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: this boolean expression can be simplified [INFO] [stdout] --> src/lib/helpers.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | if (crate_status && gem_status) [INFO] [stdout] | ________^ [INFO] [stdout] 46 | | || (crate_status && perldist_status) [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 45 - if (crate_status && gem_status) [INFO] [stdout] 46 - || (crate_status && perldist_status) [INFO] [stdout] 45 + if !(!crate_status || !gem_status && !perldist_status) [INFO] [stdout] | [INFO] [stdout] 45 - if (crate_status && gem_status) [INFO] [stdout] 46 - || (crate_status && perldist_status) [INFO] [stdout] 45 + if (perldist_status || gem_status) && crate_status [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/helpers.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | .get_crate(&pkg_name) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkg_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/helpers.rs:41:63 [INFO] [stdout] | [INFO] [stdout] 41 | let gem_status = rubygems_api::SyncClient::new().gem_info(&pkg_name).is_ok(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkg_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/helpers.rs:43:69 [INFO] [stdout] | [INFO] [stdout] 43 | let perldist_status = metacpan_api::SyncClient::new().perl_info(&pkg_name).is_ok(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkg_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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/lib/helpers.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | / (&format!("{} on the platforms {:?}", pkg_name, found_platforms) [INFO] [stdout] 62 | | .replace("[", "") [INFO] [stdout] 63 | | .replace("]", "")) [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: change this to [INFO] [stdout] | [INFO] [stdout] 61 ~ format!("{} on the platforms {:?}", pkg_name, found_platforms) [INFO] [stdout] 62 + .replace("[", "") [INFO] [stdout] 63 + .replace("]", "") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/helpers.rs:112:13 [INFO] [stdout] | [INFO] [stdout] 112 | dep_string.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `dep_string.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/helpers.rs:157:20 [INFO] [stdout] | [INFO] [stdout] 157 | crate_info(&pkg_name) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkg_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/helpers.rs:159:23 [INFO] [stdout] | [INFO] [stdout] 159 | perldist_info(&pkg_name) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `pkg_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: called `unwrap` on `git_author_env` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/helpers.rs:178:13 [INFO] [stdout] | [INFO] [stdout] 176 | let git_details = if git_author_env.is_some() && git_email_env.is_some() { [INFO] [stdout] | ------------------------ the check is happening here [INFO] [stdout] 177 | ( [INFO] [stdout] 178 | git_author_env.unwrap().to_str().unwrap().to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `git_email_env` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/helpers.rs:179:13 [INFO] [stdout] | [INFO] [stdout] 176 | let git_details = if git_author_env.is_some() && git_email_env.is_some() { [INFO] [stdout] | ----------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 179 | git_email_env.unwrap().to_str().unwrap().to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `hash_res` after checking its variant with `is_err` [INFO] [stdout] --> src/lib/helpers.rs:263:31 [INFO] [stdout] | [INFO] [stdout] 262 | if hash_res.is_err() { [INFO] [stdout] | -------------------- help: try: `if let Err() = hash_res` [INFO] [stdout] 263 | return Err(Error::Sha(hash_res.unwrap_err().to_string())); [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: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/lib/helpers.rs:216:24 [INFO] [stdout] | [INFO] [stdout] 216 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/perldist.rs:33:41 [INFO] [stdout] | [INFO] [stdout] 33 | let query_result = client.perl_info(&perldist_name); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `perldist_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/perldist.rs:46:63 [INFO] [stdout] | [INFO] [stdout] 46 | &mut || client.perl_info(&client.get_dist(&perldist_name)?), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `perldist_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/perldist.rs:58:46 [INFO] [stdout] | [INFO] [stdout] 58 | &mut || client.perl_info(&perldist_name), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `perldist_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: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib/perldist.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | &query_result.version.as_str().unwrap_or_default(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `query_result.version.as_str().unwrap_or_default()` [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: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib/tests/mod.rs:226:5 [INFO] [stdout] | [INFO] [stdout] 226 | / assert_eq!( [INFO] [stdout] 227 | | TmplBuilder::new("File::Basename") [INFO] [stdout] 228 | | .set_type(PkgType::PerlDist) [INFO] [stdout] 229 | | .is_built_in() [INFO] [stdout] 230 | | .unwrap(), [INFO] [stdout] 231 | | true [INFO] [stdout] 232 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 226 ~ assert!( [INFO] [stdout] 227 | TmplBuilder::new("File::Basename") [INFO] [stdout] 228 | .set_type(PkgType::PerlDist) [INFO] [stdout] 229 | .is_built_in() [INFO] [stdout] 230 ~ .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib/tests/mod.rs:234:5 [INFO] [stdout] | [INFO] [stdout] 234 | / assert_eq!( [INFO] [stdout] 235 | | TmplBuilder::new("json") [INFO] [stdout] 236 | | .set_type(PkgType::Gem) [INFO] [stdout] 237 | | .is_built_in() [INFO] [stdout] 238 | | .unwrap(), [INFO] [stdout] 239 | | true [INFO] [stdout] 240 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 234 ~ assert!( [INFO] [stdout] 235 | TmplBuilder::new("json") [INFO] [stdout] 236 | .set_type(PkgType::Gem) [INFO] [stdout] 237 | .is_built_in() [INFO] [stdout] 238 ~ .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib/tests/mod.rs:242:5 [INFO] [stdout] | [INFO] [stdout] 242 | / assert_eq!( [INFO] [stdout] 243 | | TmplBuilder::new("tmplgen") [INFO] [stdout] 244 | | .set_type(PkgType::Crate) [INFO] [stdout] 245 | | .is_built_in() [INFO] [stdout] 246 | | .unwrap(), [INFO] [stdout] 247 | | false [INFO] [stdout] 248 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 242 ~ assert!( [INFO] [stdout] 243 ~ !TmplBuilder::new("tmplgen") [INFO] [stdout] 244 | .set_type(PkgType::Crate) [INFO] [stdout] 245 | .is_built_in() [INFO] [stdout] 246 ~ .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/tests/mod.rs:358:9 [INFO] [stdout] | [INFO] [stdout] 358 | dep_string.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `dep_string.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: called `unwrap` on `self.pkg_type` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:98:16 [INFO] [stdout] | [INFO] [stdout] 90 | if self.pkg_type.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = self.pkg_type` [INFO] [stdout] ... [INFO] [stdout] 98 | if self.pkg_type.unwrap() == PkgType::Gem { [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 `self.pkg_type` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:108:23 [INFO] [stdout] | [INFO] [stdout] 90 | if self.pkg_type.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = self.pkg_type` [INFO] [stdout] ... [INFO] [stdout] 108 | } else if self.pkg_type.unwrap() == PkgType::PerlDist { [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 `self.pkg_info` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:147:24 [INFO] [stdout] | [INFO] [stdout] 146 | if self.pkg_info.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = &self.pkg_info` [INFO] [stdout] 147 | let deps = self [INFO] [stdout] | ________________________^ [INFO] [stdout] 148 | | .pkg_info [INFO] [stdout] 149 | | .as_ref() [INFO] [stdout] 150 | | .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 boolean expression can be simplified [INFO] [stdout] --> src/lib/tmplwriter.rs:318:12 [INFO] [stdout] | [INFO] [stdout] 318 | if !(orig_ver_string == format!("version={}", &pkg_info.version)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(orig_ver_string != format!("version={}", &pkg_info.version))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.pkg_info` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:281:16 [INFO] [stdout] | [INFO] [stdout] 280 | let pkg_info = if self.pkg_info.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = &self.pkg_info` [INFO] [stdout] 281 | Ok(self.pkg_info.as_ref().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: unnecessary map of the identity function [INFO] [stdout] --> src/lib/tmplwriter.rs:304:52 [INFO] [stdout] | [INFO] [stdout] 304 | .filter(|x| x.contains(search_str)) [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 305 | | .map(|x| x) [INFO] [stdout] | |___________________________^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/lib/tmplwriter.rs:347:22 [INFO] [stdout] | [INFO] [stdout] 347 | &format!( [INFO] [stdout] | ______________________^ [INFO] [stdout] 348 | | "distfiles=\"{}", [INFO] [stdout] 349 | | format!( [INFO] [stdout] 350 | | "{}\"", [INFO] [stdout] ... | [INFO] [stdout] 356 | | ), [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.pkg_info` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:445:16 [INFO] [stdout] | [INFO] [stdout] 444 | let pkg_info = if self.pkg_info.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = &self.pkg_info` [INFO] [stdout] 445 | Ok(self.pkg_info.as_ref().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 `pkg_info.description` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:469:18 [INFO] [stdout] | [INFO] [stdout] 466 | if pkg_info.description.is_some() { [INFO] [stdout] | --------------------------------- help: try: `if let Some() = &pkg_info.description` [INFO] [stdout] ... [INFO] [stdout] 469 | &pkg_info.description.as_ref().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 `pkg_info.license` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:485:32 [INFO] [stdout] | [INFO] [stdout] 484 | if pkg_info.license.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = &pkg_info.license` [INFO] [stdout] 485 | let license_iter = pkg_info.license.as_ref().unwrap().par_iter(); [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 `pkg_info.dependencies` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:505:32 [INFO] [stdout] | [INFO] [stdout] 504 | if pkg_info.dependencies.is_some() { [INFO] [stdout] | ---------------------------------- help: try: `if let Some() = &pkg_info.dependencies` [INFO] [stdout] 505 | let dependencies = pkg_info.dependencies.as_ref().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 `dependencies.host` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:508:51 [INFO] [stdout] | [INFO] [stdout] 507 | if dependencies.host.is_some() { [INFO] [stdout] | ------------------------------ help: try: `if let Some() = &dependencies.host` [INFO] [stdout] 508 | let host_depends = gen_dep_string(dependencies.host.as_ref().unwrap(), tmpl_type); [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 `dependencies.make` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:516:51 [INFO] [stdout] | [INFO] [stdout] 515 | if dependencies.make.is_some() { [INFO] [stdout] | ------------------------------ help: try: `if let Some() = &dependencies.make` [INFO] [stdout] 516 | let make_depends = gen_dep_string(dependencies.make.as_ref().unwrap(), tmpl_type); [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 `dependencies.run` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:523:50 [INFO] [stdout] | [INFO] [stdout] 522 | if dependencies.run.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = &dependencies.run` [INFO] [stdout] 523 | let run_depends = gen_dep_string(dependencies.run.as_ref().unwrap(), tmpl_type); [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 `pkg_info.download_url` after checking its variant with `is_some` [INFO] [stdout] --> src/lib/tmplwriter.rs:537:57 [INFO] [stdout] | [INFO] [stdout] 535 | if pkg_info.download_url.is_some() { [INFO] [stdout] | ---------------------------------- help: try: `if let Some() = &pkg_info.download_url` [INFO] [stdout] 536 | template_string = [INFO] [stdout] 537 | template_string.replace("@distfiles@", &pkg_info.download_url.as_ref().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/tmplwriter.rs:469:17 [INFO] [stdout] | [INFO] [stdout] 469 | &pkg_info.description.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `pkg_info.description.as_ref().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib/tmplwriter.rs:510:66 [INFO] [stdout] | [INFO] [stdout] 510 | template_string.replace("@hostmakedepends@", &host_depends.trim_end()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `host_depends.trim_end()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#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/tmplwriter.rs:518:62 [INFO] [stdout] | [INFO] [stdout] 518 | template_string.replace("@makedepends@", &make_depends.trim_end()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `make_depends.trim_end()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#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/tmplwriter.rs:524:72 [INFO] [stdout] | [INFO] [stdout] 524 | template_string = template_string.replace("@depends@", &run_depends.trim_end()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `run_depends.trim_end()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#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/tmplwriter.rs:537:56 [INFO] [stdout] | [INFO] [stdout] 537 | template_string.replace("@distfiles@", &pkg_info.download_url.as_ref().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `pkg_info.download_url.as_ref().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib/tmplwriter.rs:583:9 [INFO] [stdout] | [INFO] [stdout] 583 | template_string.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `template_string.push('\n')` [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: using `map` over `inspect` [INFO] [stdout] --> src/lib/types.rs:73:30 [INFO] [stdout] | [INFO] [stdout] 73 | self.inner.read(buf).map(|n| { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 73 ~ self.inner.read(buf).inspect(|&n| { [INFO] [stdout] 74 ~ self.progress_bar.inc(n as u64); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/lib/errors.rs:4:62 [INFO] [stdout] | [INFO] [stdout] 4 | #[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Fail)] [INFO] [stdout] | ^--- [INFO] [stdout] | | [INFO] [stdout] | `Fail` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_DERIVE_failure_Fail_FOR_Error` [INFO] [stdout] 5 | pub enum Error { [INFO] [stdout] | ----- `Error` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Fail` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Fail` may come from an old version of the `failure_derive` crate, try updating your dependency with `cargo update -p failure_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Fail` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/lib/errors.rs:4:62 [INFO] [stdout] | [INFO] [stdout] 4 | #[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Fail)] [INFO] [stdout] | ^--- [INFO] [stdout] | | [INFO] [stdout] | `Display` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_DERIVE_failure_core_fmt_Display_FOR_Error` [INFO] [stdout] 5 | pub enum Error { [INFO] [stdout] | ----- `Error` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Fail` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Fail` may come from an old version of the `failure_derive` crate, try updating your dependency with `cargo update -p failure_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Fail` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/bin/tests/mod.rs:28:15 [INFO] [stdout] | [INFO] [stdout] 28 | .args(&["tmplgen"]) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `["tmplgen"]` [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/bin/tests/mod.rs:45:15 [INFO] [stdout] | [INFO] [stdout] 45 | .args(&["tmplgen"]) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `["tmplgen"]` [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/bin/tests/mod.rs:55:15 [INFO] [stdout] | [INFO] [stdout] 55 | .args(&["-U", "tmplgen"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `["-U", "tmplgen"]` [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/bin/tests/mod.rs:71:15 [INFO] [stdout] | [INFO] [stdout] 71 | .args(&["tmplgen"]) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `["tmplgen"]` [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: `to_string` applied to a type that implements `Display` in `error!` args [INFO] [stdout] --> src/bin/bin.rs:49:27 [INFO] [stdout] | [INFO] [stdout] 49 | error!("{}", 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: called `unwrap` on `opts.tmpl_type` after checking its variant with `is_some` [INFO] [stdout] --> src/bin/bin.rs:63:31 [INFO] [stdout] | [INFO] [stdout] 62 | if opts.tmpl_type.is_some() { [INFO] [stdout] | --------------------------- help: try: `if let Some() = opts.tmpl_type` [INFO] [stdout] 63 | tmpl_builder.set_type(opts.tmpl_type.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: called `unwrap` on `dep_template_vec` after checking its variant with `is_ok` [INFO] [stdout] --> src/bin/bin.rs:138:22 [INFO] [stdout] | [INFO] [stdout] 137 | if dep_template_vec.is_ok() { [INFO] [stdout] | --------------------------- help: try: `if let Ok() = dep_template_vec` [INFO] [stdout] 138 | for x in dep_template_vec.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/bin/bin.rs:118:20 [INFO] [stdout] | [INFO] [stdout] 118 | create_dir_all(&xdist_template_path.replace("/template", ""))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `xdist_template_path.replace("/template", "")` [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/bin/bin.rs:141:32 [INFO] [stdout] | [INFO] [stdout] 141 | create_dir_all(&xdist_template_path.replace("/template", ""))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `xdist_template_path.replace("/template", "")` [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 `unwrap` on `home_dir` after checking its variant with `is_ok` [INFO] [stdout] --> src/bin/bin.rs:241:42 [INFO] [stdout] | [INFO] [stdout] 240 | if home_dir.is_ok() { [INFO] [stdout] | ------------------- help: try: `if let Ok() = home_dir` [INFO] [stdout] 241 | Ok(unclean_dir.replace("~", &home_dir.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: `to_string` applied to a type that implements `Display` in `error!` args [INFO] [stdout] --> src/bin/bin.rs:49:27 [INFO] [stdout] | [INFO] [stdout] 49 | error!("{}", 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: called `unwrap` on `opts.tmpl_type` after checking its variant with `is_some` [INFO] [stdout] --> src/bin/bin.rs:63:31 [INFO] [stdout] | [INFO] [stdout] 62 | if opts.tmpl_type.is_some() { [INFO] [stdout] | --------------------------- help: try: `if let Some() = opts.tmpl_type` [INFO] [stdout] 63 | tmpl_builder.set_type(opts.tmpl_type.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: called `unwrap` on `dep_template_vec` after checking its variant with `is_ok` [INFO] [stdout] --> src/bin/bin.rs:138:22 [INFO] [stdout] | [INFO] [stdout] 137 | if dep_template_vec.is_ok() { [INFO] [stdout] | --------------------------- help: try: `if let Ok() = dep_template_vec` [INFO] [stdout] 138 | for x in dep_template_vec.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/bin/bin.rs:118:20 [INFO] [stdout] | [INFO] [stdout] 118 | create_dir_all(&xdist_template_path.replace("/template", ""))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `xdist_template_path.replace("/template", "")` [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/bin/bin.rs:141:32 [INFO] [stdout] | [INFO] [stdout] 141 | create_dir_all(&xdist_template_path.replace("/template", ""))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `xdist_template_path.replace("/template", "")` [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 `unwrap` on `home_dir` after checking its variant with `is_ok` [INFO] [stdout] --> src/bin/bin.rs:241:42 [INFO] [stdout] | [INFO] [stdout] 240 | if home_dir.is_ok() { [INFO] [stdout] | ------------------- help: try: `if let Ok() = home_dir` [INFO] [stdout] 241 | Ok(unclean_dir.replace("~", &home_dir.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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 45.11s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: criterion v0.2.11 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] running `Command { std: "docker" "inspect" "37d8bf5ad230b7e598f5949ac611340ee5ca4a38d42f9b871f27c1ae6c406cbc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "37d8bf5ad230b7e598f5949ac611340ee5ca4a38d42f9b871f27c1ae6c406cbc", kill_on_drop: false }` [INFO] [stdout] 37d8bf5ad230b7e598f5949ac611340ee5ca4a38d42f9b871f27c1ae6c406cbc