[INFO] cloning repository https://github.com/jld-adriano/age-env [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/jld-adriano/age-env" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjld-adriano%2Fage-env", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjld-adriano%2Fage-env'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6e0db4a9ec57e7881fb11bda24ffe09cc60b703b [INFO] linting jld-adriano/age-env against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjld-adriano%2Fage-env" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/jld-adriano/age-env [INFO] finished tweaking git repo https://github.com/jld-adriano/age-env [INFO] tweaked toml for git repo https://github.com/jld-adriano/age-env written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/jld-adriano/age-env on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/jld-adriano/age-env 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] 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] Downloading crates ... [INFO] [stderr] Downloaded pest_derive v2.7.11 [INFO] [stderr] Downloaded which v6.0.1 [INFO] [stderr] Downloaded pest_meta v2.7.11 [INFO] [stderr] Downloaded ucd-trie v0.1.6 [INFO] [stderr] Downloaded anstyle v1.0.7 [INFO] [stderr] Downloaded dotenv-parser v0.1.3 [INFO] [stderr] Downloaded clap_complete v4.5.7 [INFO] [stderr] Downloaded clap_derive v4.5.8 [INFO] [stderr] Downloaded clap v4.5.8 [INFO] [stderr] Downloaded pest_generator v2.7.11 [INFO] [stderr] Downloaded clap_lex v0.7.1 [INFO] [stderr] Downloaded pest v2.7.11 [INFO] [stderr] Downloaded clap_builder v4.5.8 [INFO] [stderr] Downloaded syn v2.0.69 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] e5c501808bb7a304e2cab78e800b3e2dd3c777f720ffb3a72395a573f1fdff46 [INFO] running `Command { std: "docker" "start" "-a" "e5c501808bb7a304e2cab78e800b3e2dd3c777f720ffb3a72395a573f1fdff46", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e5c501808bb7a304e2cab78e800b3e2dd3c777f720ffb3a72395a573f1fdff46", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e5c501808bb7a304e2cab78e800b3e2dd3c777f720ffb3a72395a573f1fdff46", kill_on_drop: false }` [INFO] [stdout] e5c501808bb7a304e2cab78e800b3e2dd3c777f720ffb3a72395a573f1fdff46 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] ff057dcb43f801c12a0ed1a3a900eb5426a418aa267062ceb1f7fdb64df3f19f [INFO] running `Command { std: "docker" "start" "-a" "ff057dcb43f801c12a0ed1a3a900eb5426a418aa267062ceb1f7fdb64df3f19f", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.69 [INFO] [stderr] Compiling thiserror v1.0.61 [INFO] [stderr] Compiling ucd-trie v0.1.6 [INFO] [stderr] Compiling memchr v2.7.4 [INFO] [stderr] Checking anstyle v1.0.7 [INFO] [stderr] Checking colorchoice v1.0.1 [INFO] [stderr] Checking is_terminal_polyfill v1.70.0 [INFO] [stderr] Compiling once_cell v1.19.0 [INFO] [stderr] Checking anstyle-query v1.1.0 [INFO] [stderr] Checking clap_lex v0.7.1 [INFO] [stderr] Compiling rustix v0.38.34 [INFO] [stderr] Checking linux-raw-sys v0.4.14 [INFO] [stderr] Checking bitflags v2.6.0 [INFO] [stderr] Checking anstyle-parse v0.2.4 [INFO] [stderr] Checking either v1.13.0 [INFO] [stderr] Checking base64 v0.22.1 [INFO] [stderr] Checking anstream v0.6.14 [INFO] [stderr] Checking clap_builder v4.5.8 [INFO] [stderr] Checking which v6.0.1 [INFO] [stderr] Compiling thiserror-impl v1.0.61 [INFO] [stderr] Compiling clap_derive v4.5.8 [INFO] [stderr] Compiling pest v2.7.11 [INFO] [stderr] Checking clap v4.5.8 [INFO] [stderr] Checking clap_complete v4.5.7 [INFO] [stderr] Compiling pest_meta v2.7.11 [INFO] [stderr] Compiling pest_generator v2.7.11 [INFO] [stderr] Compiling pest_derive v2.7.11 [INFO] [stderr] Checking dotenv-parser v0.1.3 [INFO] [stderr] Checking age-env v0.1.26 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use dotenv_parser; [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/main.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use dotenv_parser; [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 boolean expression can be simplified [INFO] [stdout] --> src/main.rs:193:8 [INFO] [stdout] | [INFO] [stdout] 193 | if !which::which("age").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `which::which("age").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:328:50 [INFO] [stdout] | [INFO] [stdout] 328 | if !global_recipients_file_exists && !recipient.is_some() && !recipients_file.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `recipient.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:328:74 [INFO] [stdout] | [INFO] [stdout] 328 | if !global_recipients_file_exists && !recipient.is_some() && !recipients_file.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `recipients_file.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `only` after checking its variant with `is_some` [INFO] [stdout] --> src/main.rs:396:32 [INFO] [stdout] | [INFO] [stdout] 394 | } else if only.is_some() { [INFO] [stdout] | ----------------- help: try: `if let Some() = &only` [INFO] [stdout] 395 | let mut any_miss = false; [INFO] [stdout] 396 | for key in only.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] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `only` after checking its variant with `is_some` [INFO] [stdout] --> src/main.rs:403:36 [INFO] [stdout] | [INFO] [stdout] 394 | } else if only.is_some() { [INFO] [stdout] | ----------------- help: try: `if let Some() = &only` [INFO] [stdout] ... [INFO] [stdout] 403 | for key in only.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:198:24 [INFO] [stdout] | [INFO] [stdout] 198 | fs::create_dir(&dir).expect("Failed to create config directory"); [INFO] [stdout] | ^^^^ help: change this to: `dir` [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: literal with an empty format string [INFO] [stdout] --> src/main.rs:432:56 [INFO] [stdout] | [INFO] [stdout] 432 | println!("{}={}", passthrough_key, "1"); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 432 - println!("{}={}", passthrough_key, "1"); [INFO] [stdout] 432 + println!("{}=1", passthrough_key); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:487:59 [INFO] [stdout] | [INFO] [stdout] 487 | println!("export {}={}", passthrough_key, "1"); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 487 - println!("export {}={}", passthrough_key, "1"); [INFO] [stdout] 487 + println!("export {}=1", passthrough_key); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:504:16 [INFO] [stdout] | [INFO] [stdout] 504 | if files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `files.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: length comparison to one [INFO] [stdout] --> src/main.rs:593:16 [INFO] [stdout] | [INFO] [stdout] 593 | if command.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `command.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:618:53 [INFO] [stdout] | [INFO] [stdout] 618 | let mut child = command_process.spawn().expect(&format!( [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 619 | | "Failed to spawn command process: `{}`", [INFO] [stdout] 620 | | command[0] [INFO] [stdout] 621 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 618 ~ let mut child = command_process.spawn().unwrap_or_else(|_| panic!("Failed to spawn command process: `{}`", [INFO] [stdout] 619 ~ command[0])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:626:32 [INFO] [stdout] | [INFO] [stdout] 626 | fs::remove_dir_all(&dir).expect("Failed to remove config directory"); [INFO] [stdout] | ^^^^ help: change this to: `dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/main.rs:701:5 [INFO] [stdout] | [INFO] [stdout] 701 | / if for_name_preload_data.is_none() { [INFO] [stdout] 702 | | return None; [INFO] [stdout] 703 | | } [INFO] [stdout] | |_____^ help: replace it with: `for_name_preload_data?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:732:5 [INFO] [stdout] | [INFO] [stdout] 725 | / let status = encrypt_contents_into_file( [INFO] [stdout] 726 | | recipient, [INFO] [stdout] 727 | | recipients_file, [INFO] [stdout] 728 | | global_recipients_file, [INFO] [stdout] 729 | | &path, [INFO] [stdout] 730 | | String::from_utf8(previous_contents).unwrap(), [INFO] [stdout] 731 | | ); [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 732 | status [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 725 ~ [INFO] [stdout] 726 ~ encrypt_contents_into_file( [INFO] [stdout] 727 + recipient, [INFO] [stdout] 728 + recipients_file, [INFO] [stdout] 729 + global_recipients_file, [INFO] [stdout] 730 + &path, [INFO] [stdout] 731 + String::from_utf8(previous_contents).unwrap(), [INFO] [stdout] 732 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:750:5 [INFO] [stdout] | [INFO] [stdout] 745 | / let filtered_env_contents = if let Some(exclude_keys) = exclude { [INFO] [stdout] 746 | | exclude_env_contents(filtered_env_contents, exclude_keys) [INFO] [stdout] 747 | | } else { [INFO] [stdout] 748 | | filtered_env_contents [INFO] [stdout] 749 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 750 | filtered_env_contents [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 745 ~ [INFO] [stdout] 746 ~ if let Some(exclude_keys) = exclude { [INFO] [stdout] 747 + exclude_env_contents(filtered_env_contents, exclude_keys) [INFO] [stdout] 748 + } else { [INFO] [stdout] 749 + filtered_env_contents [INFO] [stdout] 750 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:755:19 [INFO] [stdout] | [INFO] [stdout] 755 | exclude_keys: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 755 - exclude_keys: &Vec, [INFO] [stdout] 755 + exclude_keys: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:764:16 [INFO] [stdout] | [INFO] [stdout] 764 | only_keys: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 764 - only_keys: &Vec, [INFO] [stdout] 764 + only_keys: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:776:34 [INFO] [stdout] | [INFO] [stdout] 776 | let file_contents = fs::read(&file).expect("Failed to read environment file"); [INFO] [stdout] | ^^^^^ help: change this to: `file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:780:14 [INFO] [stdout] | [INFO] [stdout] 780 | .arg(&identities_file) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `identities_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:848:5 [INFO] [stdout] | [INFO] [stdout] 847 | let status = child.wait().expect("Failed to wait for age command"); [INFO] [stdout] | ------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 848 | status [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 847 ~ [INFO] [stdout] 848 ~ child.wait().expect("Failed to wait for age command") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:823:35 [INFO] [stdout] | [INFO] [stdout] 823 | age_command.arg("-r").arg(&recipient); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `recipient` [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/main.rs:826:35 [INFO] [stdout] | [INFO] [stdout] 826 | age_command.arg("-R").arg(&recipients_file); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `recipients_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:829:35 [INFO] [stdout] | [INFO] [stdout] 829 | age_command.arg("-R").arg(&global_recipients_file); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `global_recipients_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:193:8 [INFO] [stdout] | [INFO] [stdout] 193 | if !which::which("age").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `which::which("age").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:328:50 [INFO] [stdout] | [INFO] [stdout] 328 | if !global_recipients_file_exists && !recipient.is_some() && !recipients_file.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `recipient.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:328:74 [INFO] [stdout] | [INFO] [stdout] 328 | if !global_recipients_file_exists && !recipient.is_some() && !recipients_file.is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `recipients_file.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `only` after checking its variant with `is_some` [INFO] [stdout] --> src/main.rs:396:32 [INFO] [stdout] | [INFO] [stdout] 394 | } else if only.is_some() { [INFO] [stdout] | ----------------- help: try: `if let Some() = &only` [INFO] [stdout] 395 | let mut any_miss = false; [INFO] [stdout] 396 | for key in only.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] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `only` after checking its variant with `is_some` [INFO] [stdout] --> src/main.rs:403:36 [INFO] [stdout] | [INFO] [stdout] 394 | } else if only.is_some() { [INFO] [stdout] | ----------------- help: try: `if let Some() = &only` [INFO] [stdout] ... [INFO] [stdout] 403 | for key in only.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:198:24 [INFO] [stdout] | [INFO] [stdout] 198 | fs::create_dir(&dir).expect("Failed to create config directory"); [INFO] [stdout] | ^^^^ help: change this to: `dir` [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: literal with an empty format string [INFO] [stdout] --> src/main.rs:432:56 [INFO] [stdout] | [INFO] [stdout] 432 | println!("{}={}", passthrough_key, "1"); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 432 - println!("{}={}", passthrough_key, "1"); [INFO] [stdout] 432 + println!("{}=1", passthrough_key); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:487:59 [INFO] [stdout] | [INFO] [stdout] 487 | println!("export {}={}", passthrough_key, "1"); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 487 - println!("export {}={}", passthrough_key, "1"); [INFO] [stdout] 487 + println!("export {}=1", passthrough_key); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:504:16 [INFO] [stdout] | [INFO] [stdout] 504 | if files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `files.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: length comparison to one [INFO] [stdout] --> src/main.rs:593:16 [INFO] [stdout] | [INFO] [stdout] 593 | if command.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `command.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/main.rs:618:53 [INFO] [stdout] | [INFO] [stdout] 618 | let mut child = command_process.spawn().expect(&format!( [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 619 | | "Failed to spawn command process: `{}`", [INFO] [stdout] 620 | | command[0] [INFO] [stdout] 621 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 618 ~ let mut child = command_process.spawn().unwrap_or_else(|_| panic!("Failed to spawn command process: `{}`", [INFO] [stdout] 619 ~ command[0])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:626:32 [INFO] [stdout] | [INFO] [stdout] 626 | fs::remove_dir_all(&dir).expect("Failed to remove config directory"); [INFO] [stdout] | ^^^^ help: change this to: `dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/main.rs:701:5 [INFO] [stdout] | [INFO] [stdout] 701 | / if for_name_preload_data.is_none() { [INFO] [stdout] 702 | | return None; [INFO] [stdout] 703 | | } [INFO] [stdout] | |_____^ help: replace it with: `for_name_preload_data?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:732:5 [INFO] [stdout] | [INFO] [stdout] 725 | / let status = encrypt_contents_into_file( [INFO] [stdout] 726 | | recipient, [INFO] [stdout] 727 | | recipients_file, [INFO] [stdout] 728 | | global_recipients_file, [INFO] [stdout] 729 | | &path, [INFO] [stdout] 730 | | String::from_utf8(previous_contents).unwrap(), [INFO] [stdout] 731 | | ); [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 732 | status [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 725 ~ [INFO] [stdout] 726 ~ encrypt_contents_into_file( [INFO] [stdout] 727 + recipient, [INFO] [stdout] 728 + recipients_file, [INFO] [stdout] 729 + global_recipients_file, [INFO] [stdout] 730 + &path, [INFO] [stdout] 731 + String::from_utf8(previous_contents).unwrap(), [INFO] [stdout] 732 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:750:5 [INFO] [stdout] | [INFO] [stdout] 745 | / let filtered_env_contents = if let Some(exclude_keys) = exclude { [INFO] [stdout] 746 | | exclude_env_contents(filtered_env_contents, exclude_keys) [INFO] [stdout] 747 | | } else { [INFO] [stdout] 748 | | filtered_env_contents [INFO] [stdout] 749 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 750 | filtered_env_contents [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 745 ~ [INFO] [stdout] 746 ~ if let Some(exclude_keys) = exclude { [INFO] [stdout] 747 + exclude_env_contents(filtered_env_contents, exclude_keys) [INFO] [stdout] 748 + } else { [INFO] [stdout] 749 + filtered_env_contents [INFO] [stdout] 750 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:755:19 [INFO] [stdout] | [INFO] [stdout] 755 | exclude_keys: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 755 - exclude_keys: &Vec, [INFO] [stdout] 755 + exclude_keys: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:764:16 [INFO] [stdout] | [INFO] [stdout] 764 | only_keys: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 764 - only_keys: &Vec, [INFO] [stdout] 764 + only_keys: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:776:34 [INFO] [stdout] | [INFO] [stdout] 776 | let file_contents = fs::read(&file).expect("Failed to read environment file"); [INFO] [stdout] | ^^^^^ help: change this to: `file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:780:14 [INFO] [stdout] | [INFO] [stdout] 780 | .arg(&identities_file) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `identities_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:848:5 [INFO] [stdout] | [INFO] [stdout] 847 | let status = child.wait().expect("Failed to wait for age command"); [INFO] [stdout] | ------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 848 | status [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 847 ~ [INFO] [stdout] 848 ~ child.wait().expect("Failed to wait for age command") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:823:35 [INFO] [stdout] | [INFO] [stdout] 823 | age_command.arg("-r").arg(&recipient); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `recipient` [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/main.rs:826:35 [INFO] [stdout] | [INFO] [stdout] 826 | age_command.arg("-R").arg(&recipients_file); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `recipients_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:829:35 [INFO] [stdout] | [INFO] [stdout] 829 | age_command.arg("-R").arg(&global_recipients_file); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `global_recipients_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.51s [INFO] running `Command { std: "docker" "inspect" "ff057dcb43f801c12a0ed1a3a900eb5426a418aa267062ceb1f7fdb64df3f19f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ff057dcb43f801c12a0ed1a3a900eb5426a418aa267062ceb1f7fdb64df3f19f", kill_on_drop: false }` [INFO] [stdout] ff057dcb43f801c12a0ed1a3a900eb5426a418aa267062ceb1f7fdb64df3f19f