[INFO] fetching crate envop 1.0.5... [INFO] linting envop-1.0.5 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate envop 1.0.5 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate envop 1.0.5 [INFO] finished tweaking crates.io crate envop 1.0.5 [INFO] tweaked toml for crates.io crate envop 1.0.5 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate envop 1.0.5 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 envop 1.0.5 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_derive v1.0.144 [INFO] [stderr] Downloaded argh_shared v0.1.8 [INFO] [stderr] Downloaded dyn-clone v1.0.9 [INFO] [stderr] Downloaded newline-converter v0.2.0 [INFO] [stderr] Downloaded argh v0.1.8 [INFO] [stderr] Downloaded lock_api v0.4.8 [INFO] [stderr] Downloaded argh_derive v0.1.8 [INFO] [stderr] Downloaded inquire v0.3.0 [INFO] [stderr] Downloaded serde v1.0.144 [INFO] [stderr] Downloaded libc v0.2.132 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 14099ce78e79c578fceb0c51c210549fdf83fd6c2035cc96a49c05141e21f2ed [INFO] running `Command { std: "docker" "start" "-a" "14099ce78e79c578fceb0c51c210549fdf83fd6c2035cc96a49c05141e21f2ed", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "14099ce78e79c578fceb0c51c210549fdf83fd6c2035cc96a49c05141e21f2ed", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "14099ce78e79c578fceb0c51c210549fdf83fd6c2035cc96a49c05141e21f2ed", kill_on_drop: false }` [INFO] [stdout] 14099ce78e79c578fceb0c51c210549fdf83fd6c2035cc96a49c05141e21f2ed [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 51ba2d212bbfbd4eb699b06c256ee03bbd1c8726842a3f5074e52b60ca8095ab [INFO] running `Command { std: "docker" "start" "-a" "51ba2d212bbfbd4eb699b06c256ee03bbd1c8726842a3f5074e52b60ca8095ab", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.43 [INFO] [stderr] Compiling unicode-ident v1.0.3 [INFO] [stderr] Compiling quote v1.0.21 [INFO] [stderr] Compiling syn v1.0.99 [INFO] [stderr] Compiling libc v0.2.132 [INFO] [stderr] Compiling signal-hook v0.3.14 [INFO] [stderr] Compiling parking_lot_core v0.9.3 [INFO] [stderr] Checking smallvec v1.9.0 [INFO] [stderr] Compiling serde_derive v1.0.144 [INFO] [stderr] Compiling serde v1.0.144 [INFO] [stderr] Compiling unicode-segmentation v1.9.0 [INFO] [stderr] Compiling serde_json v1.0.85 [INFO] [stderr] Compiling lock_api v0.4.8 [INFO] [stderr] Compiling argh_shared v0.1.8 [INFO] [stderr] Checking itoa v1.0.3 [INFO] [stderr] Checking newline-converter v0.2.0 [INFO] [stderr] Checking unicode-width v0.1.9 [INFO] [stderr] Checking ryu v1.0.11 [INFO] [stderr] Checking dyn-clone v1.0.9 [INFO] [stderr] Checking glob v0.3.0 [INFO] [stderr] Compiling heck v0.3.3 [INFO] [stderr] Checking signal-hook-registry v1.4.0 [INFO] [stderr] Checking mio v0.8.4 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking signal-hook-mio v0.2.3 [INFO] [stderr] Checking crossterm v0.25.0 [INFO] [stderr] Compiling thiserror-impl v1.0.32 [INFO] [stderr] Compiling argh_derive v0.1.8 [INFO] [stderr] Checking argh v0.1.8 [INFO] [stderr] Checking thiserror v1.0.32 [INFO] [stderr] Checking inquire v0.3.0 [INFO] [stderr] Checking envop v1.0.5 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/op_utils.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/op_utils.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/main.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | / /// Sync environment variables using 1password. Requires the 1password CLI to be installed: https://1password.com/downloads/comman... [INFO] [stdout] 27 | | [INFO] [stdout] | |_^ [INFO] [stdout] 28 | struct Args { [INFO] [stdout] | ----------- the comment documents this struct [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: empty line after doc comment [INFO] [stdout] --> src/main.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | / /// Sync environment variables using 1password. Requires the 1password CLI to be installed: https://1password.com/downloads/comman... [INFO] [stdout] 27 | | [INFO] [stdout] | |_^ [INFO] [stdout] 28 | struct Args { [INFO] [stdout] | ----------- the comment documents this struct [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: field `0` is never read [INFO] [stdout] --> src/op_utils.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | IOError(io::Error), [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ParseOPError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 81 - IOError(io::Error), [INFO] [stdout] 81 + IOError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/op_utils.rs:82:20 [INFO] [stdout] | [INFO] [stdout] 82 | SerializeError(serde_json::Error), [INFO] [stdout] | -------------- ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ParseOPError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 82 - SerializeError(serde_json::Error), [INFO] [stdout] 82 + SerializeError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/op_utils.rs:83:19 [INFO] [stdout] | [INFO] [stdout] 83 | FromUtf8Error(FromUtf8Error), [INFO] [stdout] | ------------- ^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ParseOPError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 83 - FromUtf8Error(FromUtf8Error), [INFO] [stdout] 83 + FromUtf8Error(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `EnvVariables` is never constructed [INFO] [stdout] --> src/utils.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct EnvVariables(pub Vec); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/op_utils.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | IOError(io::Error), [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ParseOPError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 81 - IOError(io::Error), [INFO] [stdout] 81 + IOError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/op_utils.rs:82:20 [INFO] [stdout] | [INFO] [stdout] 82 | SerializeError(serde_json::Error), [INFO] [stdout] | -------------- ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ParseOPError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 82 - SerializeError(serde_json::Error), [INFO] [stdout] 82 + SerializeError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/op_utils.rs:83:19 [INFO] [stdout] | [INFO] [stdout] 83 | FromUtf8Error(FromUtf8Error), [INFO] [stdout] | ------------- ^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ParseOPError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 83 - FromUtf8Error(FromUtf8Error), [INFO] [stdout] 83 + FromUtf8Error(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `EnvVariables` is never constructed [INFO] [stdout] --> src/utils.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct EnvVariables(pub Vec); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/op_utils.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | / pub enum ParseOPError { [INFO] [stdout] 81 | | IOError(io::Error), [INFO] [stdout] 82 | | SerializeError(serde_json::Error), [INFO] [stdout] 83 | | FromUtf8Error(FromUtf8Error), [INFO] [stdout] 84 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/op_utils.rs:246:72 [INFO] [stdout] | [INFO] [stdout] 246 | Ok(output @ Output { status, .. }) if !status.success() => Err(io::Error::new( [INFO] [stdout] | ________________________________________________________________________^ [INFO] [stdout] 247 | | io::ErrorKind::Other, [INFO] [stdout] 248 | | String::from_utf8(output.stderr).expect(""), [INFO] [stdout] 249 | | )), [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] 246 ~ Ok(output @ Output { status, .. }) if !status.success() => Err(io::Error::other( [INFO] [stdout] 247 ~ String::from_utf8(output.stderr).expect(""), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/op_utils.rs:251:23 [INFO] [stdout] | [INFO] [stdout] 251 | output => Err(io::Error::new( [INFO] [stdout] | _______________________^ [INFO] [stdout] 252 | | io::ErrorKind::Other, [INFO] [stdout] 253 | | format!("Failed to inject because of an unknown error: {:?}", output), [INFO] [stdout] 254 | | )), [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] 251 ~ output => Err(io::Error::other( [INFO] [stdout] 252 ~ format!("Failed to inject because of an unknown error: {:?}", output), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/utils.rs:18:23 [INFO] [stdout] | [INFO] [stdout] 18 | self.0.iter().fold(Ok(()), |result, env| { [INFO] [stdout] | _______________________^ [INFO] [stdout] 19 | | result.and_then(|_| writeln!(f, "{}", env.key)) [INFO] [stdout] 20 | | }) [INFO] [stdout] | |__________^ help: use `try_fold` instead: `try_fold((), |result, env| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] = note: `#[warn(clippy::manual_try_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/op_utils.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | / pub enum ParseOPError { [INFO] [stdout] 81 | | IOError(io::Error), [INFO] [stdout] 82 | | SerializeError(serde_json::Error), [INFO] [stdout] 83 | | FromUtf8Error(FromUtf8Error), [INFO] [stdout] 84 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/utils.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let env; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `env` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 65 ~ [INFO] [stdout] 66 | [INFO] [stdout] 67 ~ let env = if line.contains("=") { [INFO] [stdout] 68 | let mut env_iterator: Split<&str> = line.split("="); [INFO] [stdout] ... [INFO] [stdout] 72 | [INFO] [stdout] 73 ~ Some(EnvVariable { [INFO] [stdout] 74 | key: String::from(key), [INFO] [stdout] 75 | value: String::from(value), [INFO] [stdout] 76 ~ }) [INFO] [stdout] 77 | } else { [INFO] [stdout] 78 ~ None [INFO] [stdout] 79 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/op_utils.rs:246:72 [INFO] [stdout] | [INFO] [stdout] 246 | Ok(output @ Output { status, .. }) if !status.success() => Err(io::Error::new( [INFO] [stdout] | ________________________________________________________________________^ [INFO] [stdout] 247 | | io::ErrorKind::Other, [INFO] [stdout] 248 | | String::from_utf8(output.stderr).expect(""), [INFO] [stdout] 249 | | )), [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] 246 ~ Ok(output @ Output { status, .. }) if !status.success() => Err(io::Error::other( [INFO] [stdout] 247 ~ String::from_utf8(output.stderr).expect(""), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/op_utils.rs:251:23 [INFO] [stdout] | [INFO] [stdout] 251 | output => Err(io::Error::new( [INFO] [stdout] | _______________________^ [INFO] [stdout] 252 | | io::ErrorKind::Other, [INFO] [stdout] 253 | | format!("Failed to inject because of an unknown error: {:?}", output), [INFO] [stdout] 254 | | )), [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] 251 ~ output => Err(io::Error::other( [INFO] [stdout] 252 ~ format!("Failed to inject because of an unknown error: {:?}", output), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/utils.rs:18:23 [INFO] [stdout] | [INFO] [stdout] 18 | self.0.iter().fold(Ok(()), |result, env| { [INFO] [stdout] | _______________________^ [INFO] [stdout] 19 | | result.and_then(|_| writeln!(f, "{}", env.key)) [INFO] [stdout] 20 | | }) [INFO] [stdout] | |__________^ help: use `try_fold` instead: `try_fold((), |result, env| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] = note: `#[warn(clippy::manual_try_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/utils.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let env; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `env` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 65 ~ [INFO] [stdout] 66 | [INFO] [stdout] 67 ~ let env = if line.contains("=") { [INFO] [stdout] 68 | let mut env_iterator: Split<&str> = line.split("="); [INFO] [stdout] ... [INFO] [stdout] 72 | [INFO] [stdout] 73 ~ Some(EnvVariable { [INFO] [stdout] 74 | key: String::from(key), [INFO] [stdout] 75 | value: String::from(value), [INFO] [stdout] 76 ~ }) [INFO] [stdout] 77 | } else { [INFO] [stdout] 78 ~ None [INFO] [stdout] 79 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:107:36 [INFO] [stdout] | [INFO] [stdout] 107 | OPItem { id, .. } if id == String::from("create-new") => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"create-new"` [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: unnecessarily eager cloning of iterator items [INFO] [stdout] --> src/main.rs:117:45 [INFO] [stdout] | [INFO] [stdout] 117 | let mut item_sections: Vec = item_details [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 118 | | .sections [INFO] [stdout] 119 | | .unwrap_or(Vec::new()) [INFO] [stdout] 120 | | .iter() [INFO] [stdout] | | ________________- [INFO] [stdout] 121 | || .cloned() [INFO] [stdout] 122 | || .filter(|section| section.label.is_some()) [INFO] [stdout] | ||__________________________________________________^ [INFO] [stdout] | |__________________________________________________| [INFO] [stdout] | help: try: `.filter(|§ion| section.label.is_some()).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] = note: `#[warn(clippy::iter_overeager_cloned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:143:39 [INFO] [stdout] | [INFO] [stdout] 143 | OPSection { id, .. } if id == String::from("create-new") => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"create-new"` [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/main.rs:151:39 [INFO] [stdout] | [INFO] [stdout] 151 | OPSection { id, .. } if id == String::from("none") => None, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"none"` [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 boolean expression can be simplified [INFO] [stdout] --> src/main.rs:168:17 [INFO] [stdout] | [INFO] [stdout] 168 | / (field_env.key == env.key && field_env.value != env.value) [INFO] [stdout] 169 | | || field_env.key != env.key [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] 168 - (field_env.key == env.key && field_env.value != env.value) [INFO] [stdout] 169 - || field_env.key != env.key [INFO] [stdout] 168 + !(field_env.key == env.key && field_env.value == env.value) [INFO] [stdout] | [INFO] [stdout] 168 - (field_env.key == env.key && field_env.value != env.value) [INFO] [stdout] 169 - || field_env.key != env.key [INFO] [stdout] 168 + field_env.key != env.key || field_env.value != env.value [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:188:8 [INFO] [stdout] | [INFO] [stdout] 188 | if env_vars_to_sync.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!env_vars_to_sync.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: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/main.rs:244:13 [INFO] [stdout] | [INFO] [stdout] 244 | / item_provision_vars = item_provision_vars [INFO] [stdout] 245 | | .into_iter() [INFO] [stdout] 246 | | .filter(|item_var| { [INFO] [stdout] 247 | | provision_vars [INFO] [stdout] ... | [INFO] [stdout] 250 | | }) [INFO] [stdout] 251 | | .collect(); [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] help: consider calling `.retain()` instead [INFO] [stdout] | [INFO] [stdout] 244 ~ item_provision_vars.retain(|item_var| { [INFO] [stdout] 245 + provision_vars [INFO] [stdout] 246 + .iter() [INFO] [stdout] 247 + .all(|provision_var| provision_var.key != item_var.key) [INFO] [stdout] 248 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:107:36 [INFO] [stdout] | [INFO] [stdout] 107 | OPItem { id, .. } if id == String::from("create-new") => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"create-new"` [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: unnecessarily eager cloning of iterator items [INFO] [stdout] --> src/main.rs:117:45 [INFO] [stdout] | [INFO] [stdout] 117 | let mut item_sections: Vec = item_details [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 118 | | .sections [INFO] [stdout] 119 | | .unwrap_or(Vec::new()) [INFO] [stdout] 120 | | .iter() [INFO] [stdout] | | ________________- [INFO] [stdout] 121 | || .cloned() [INFO] [stdout] 122 | || .filter(|section| section.label.is_some()) [INFO] [stdout] | ||__________________________________________________^ [INFO] [stdout] | |__________________________________________________| [INFO] [stdout] | help: try: `.filter(|§ion| section.label.is_some()).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] = note: `#[warn(clippy::iter_overeager_cloned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:143:39 [INFO] [stdout] | [INFO] [stdout] 143 | OPSection { id, .. } if id == String::from("create-new") => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"create-new"` [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/main.rs:151:39 [INFO] [stdout] | [INFO] [stdout] 151 | OPSection { id, .. } if id == String::from("none") => None, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"none"` [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 boolean expression can be simplified [INFO] [stdout] --> src/main.rs:168:17 [INFO] [stdout] | [INFO] [stdout] 168 | / (field_env.key == env.key && field_env.value != env.value) [INFO] [stdout] 169 | | || field_env.key != env.key [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] 168 - (field_env.key == env.key && field_env.value != env.value) [INFO] [stdout] 169 - || field_env.key != env.key [INFO] [stdout] 168 + !(field_env.key == env.key && field_env.value == env.value) [INFO] [stdout] | [INFO] [stdout] 168 - (field_env.key == env.key && field_env.value != env.value) [INFO] [stdout] 169 - || field_env.key != env.key [INFO] [stdout] 168 + field_env.key != env.key || field_env.value != env.value [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:188:8 [INFO] [stdout] | [INFO] [stdout] 188 | if env_vars_to_sync.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!env_vars_to_sync.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: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/main.rs:244:13 [INFO] [stdout] | [INFO] [stdout] 244 | / item_provision_vars = item_provision_vars [INFO] [stdout] 245 | | .into_iter() [INFO] [stdout] 246 | | .filter(|item_var| { [INFO] [stdout] 247 | | provision_vars [INFO] [stdout] ... | [INFO] [stdout] 250 | | }) [INFO] [stdout] 251 | | .collect(); [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] help: consider calling `.retain()` instead [INFO] [stdout] | [INFO] [stdout] 244 ~ item_provision_vars.retain(|item_var| { [INFO] [stdout] 245 + provision_vars [INFO] [stdout] 246 + .iter() [INFO] [stdout] 247 + .all(|provision_var| provision_var.key != item_var.key) [INFO] [stdout] 248 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.80s [INFO] running `Command { std: "docker" "inspect" "51ba2d212bbfbd4eb699b06c256ee03bbd1c8726842a3f5074e52b60ca8095ab", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "51ba2d212bbfbd4eb699b06c256ee03bbd1c8726842a3f5074e52b60ca8095ab", kill_on_drop: false }` [INFO] [stdout] 51ba2d212bbfbd4eb699b06c256ee03bbd1c8726842a3f5074e52b60ca8095ab