[INFO] cloning repository https://github.com/applicative-systems/nxbd [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/applicative-systems/nxbd" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fapplicative-systems%2Fnxbd", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fapplicative-systems%2Fnxbd'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ec00cb3d6dbe483febcaac1a6efd42976e5d8775 [INFO] linting applicative-systems/nxbd against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fapplicative-systems%2Fnxbd" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/applicative-systems/nxbd [INFO] finished tweaking git repo https://github.com/applicative-systems/nxbd [INFO] tweaked toml for git repo https://github.com/applicative-systems/nxbd written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/applicative-systems/nxbd 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/applicative-systems/nxbd 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] Downloading crates ... [INFO] [stderr] Downloaded owo-colors v4.2.0 [INFO] [stderr] Downloaded clap_complete v4.5.47 [INFO] [stderr] Downloaded uzers v0.12.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 082571845c94401ee918da9e4080e7a2a9c18e187e64f2446675f006447669e7 [INFO] running `Command { std: "docker" "start" "-a" "082571845c94401ee918da9e4080e7a2a9c18e187e64f2446675f006447669e7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "082571845c94401ee918da9e4080e7a2a9c18e187e64f2446675f006447669e7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "082571845c94401ee918da9e4080e7a2a9c18e187e64f2446675f006447669e7", kill_on_drop: false }` [INFO] [stdout] 082571845c94401ee918da9e4080e7a2a9c18e187e64f2446675f006447669e7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 83ac978fc15a6a61364052594b097443cbf0d3224295a98791e6d748750da069 [INFO] running `Command { std: "docker" "start" "-a" "83ac978fc15a6a61364052594b097443cbf0d3224295a98791e6d748750da069", kill_on_drop: false }` [INFO] [stderr] Checking bitflags v2.9.0 [INFO] [stderr] Compiling rustix v1.0.5 [INFO] [stderr] Compiling owo-colors v4.2.0 [INFO] [stderr] Checking linux-raw-sys v0.9.4 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Compiling nix v0.29.0 [INFO] [stderr] Checking env_home v0.1.0 [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Checking clap_builder v4.5.36 [INFO] [stderr] Checking indexmap v2.9.0 [INFO] [stderr] Checking uzers v0.12.1 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking which v7.0.3 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling clap_derive v4.5.32 [INFO] [stderr] Checking clap v4.5.36 [INFO] [stderr] Checking clap_complete v4.5.47 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Checking nxbd v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/libnxbd/configcheck.rs:994:9 [INFO] [stdout] | [INFO] [stdout] 994 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:246:42 [INFO] [stdout] | [INFO] [stdout] 246 | ... message: format!("User '{}' does not exist on target system", current_user), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] = note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]` [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 246 - message: format!("User '{}' does not exist on target system", current_user), [INFO] [stdout] 246 + message: format!("User '{current_user}' does not exist on target system"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/libnxbd/configcheck.rs:252:77 [INFO] [stdout] | [INFO] [stdout] 252 | ... .any(|local_key| user.ssh_keys.contains(&local_key)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `local_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `-W clippy::needless-borrow` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:257:50 [INFO] [stdout] | [INFO] [stdout] 257 | ... message: format!( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 258 | | ... "User '{}' exists but none of their local SSH keys are authorized", [INFO] [stdout] 259 | | ... current_user [INFO] [stdout] 260 | | ... ), [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:278:42 [INFO] [stdout] | [INFO] [stdout] 278 | ... message: format!("User '{}' does not exist on target system", current_user), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 278 - message: format!("User '{}' does not exist on target system", current_user), [INFO] [stdout] 278 + message: format!("User '{current_user}' does not exist on target system"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:284:50 [INFO] [stdout] | [INFO] [stdout] 284 | ... message: format!( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 285 | | ... "User '{}' is not in the wheel group", [INFO] [stdout] 286 | | ... current_user [INFO] [stdout] 287 | | ... ), [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:397:46 [INFO] [stdout] | [INFO] [stdout] 397 | ... message: format!( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 398 | | ... "Too many {} generations kept ({}). Consider reducing to 10 or less", [INFO] [stdout] 399 | | ... bootloader, limit [INFO] [stdout] 400 | | ... ), [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:404:46 [INFO] [stdout] | [INFO] [stdout] 404 | ... message: format!( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 405 | | ... "No {} generation limit set. This may prevent old generations from being garbage collected", [INFO] [stdout] 406 | | ... bootloader [INFO] [stdout] 407 | | ... ), [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:783:28 [INFO] [stdout] | [INFO] [stdout] 783 | Self::Io(e) => write!(f, "IO error: {}", e), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 783 - Self::Io(e) => write!(f, "IO error: {}", e), [INFO] [stdout] 783 + Self::Io(e) => write!(f, "IO error: {e}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:784:30 [INFO] [stdout] | [INFO] [stdout] 784 | Self::Yaml(e) => write!(f, "YAML error: {}", e), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 784 - Self::Yaml(e) => write!(f, "YAML error: {}", e), [INFO] [stdout] 784 + Self::Yaml(e) => write!(f, "YAML error: {e}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/libnxbd/configcheck.rs:806:67 [INFO] [stdout] | [INFO] [stdout] 806 | let mut ignore_map = load_ignored_checks(path).unwrap_or_else(|| HashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `HashMap::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `-W clippy::redundant-closure` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::redundant_closure)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary boolean `not` operation [INFO] [stdout] --> src/libnxbd/configcheck.rs:825:9 [INFO] [stdout] | [INFO] [stdout] 825 | / if !system_map_inner.is_empty() { [INFO] [stdout] 826 | | // Replace or insert the system's ignored checks [INFO] [stdout] 827 | | ignore_map.insert(system.attribute.clone(), IgnoreMap(system_map_inner)); [INFO] [stdout] 828 | | } else { [INFO] [stdout] 829 | | // If no failures for this system, remove it from ignored checks [INFO] [stdout] 830 | | ignore_map.remove(&system.attribute); [INFO] [stdout] 831 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else [INFO] [stdout] = note: `-W clippy::if-not-else` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::if_not_else)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 825 ~ if system_map_inner.is_empty() { [INFO] [stdout] 826 + // If no failures for this system, remove it from ignored checks [INFO] [stdout] 827 + ignore_map.remove(&system.attribute); [INFO] [stdout] 828 + } else { [INFO] [stdout] 829 + // Replace or insert the system's ignored checks [INFO] [stdout] 830 + ignore_map.insert(system.attribute.clone(), IgnoreMap(system_map_inner)); [INFO] [stdout] 831 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/libnxbd/configcheck.rs:849:20 [INFO] [stdout] | [INFO] [stdout] 849 | /// Error type for parse_ignore_string [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 849 - /// Error type for parse_ignore_string [INFO] [stdout] 849 + /// Error type for `parse_ignore_string` [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:863:36 [INFO] [stdout] | [INFO] [stdout] 863 | Self::NoGroup(item) => write!(f, "No group specified in '{}' (missing '.')", item), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 863 - Self::NoGroup(item) => write!(f, "No group specified in '{}' (missing '.')", item), [INFO] [stdout] 863 + Self::NoGroup(item) => write!(f, "No group specified in '{item}' (missing '.')"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:864:39 [INFO] [stdout] | [INFO] [stdout] 864 | Self::EmptyGroup(item) => write!(f, "Empty group name in '{}'", item), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 864 - Self::EmptyGroup(item) => write!(f, "Empty group name in '{}'", item), [INFO] [stdout] 864 + Self::EmptyGroup(item) => write!(f, "Empty group name in '{item}'"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:865:39 [INFO] [stdout] | [INFO] [stdout] 865 | Self::EmptyCheck(item) => write!(f, "Empty check name in '{}'", item), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 865 - Self::EmptyCheck(item) => write!(f, "Empty check name in '{}'", item), [INFO] [stdout] 865 + Self::EmptyCheck(item) => write!(f, "Empty check name in '{item}'"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/libnxbd/configcheck.rs:870:75 [INFO] [stdout] | [INFO] [stdout] 870 | /// Parses a comma-separated list of group.check or group.* items into an IgnoreMap [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 870 - /// Parses a comma-separated list of group.check or group.* items into an IgnoreMap [INFO] [stdout] 870 + /// Parses a comma-separated list of group.check or group.* items into an `IgnoreMap` [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/libnxbd/configcheck.rs:879:16 [INFO] [stdout] | [INFO] [stdout] 879 | /// Returns an IgnoreMap where: [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 879 - /// Returns an IgnoreMap where: [INFO] [stdout] 879 + /// Returns an `IgnoreMap` where: [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/libnxbd/configcheck.rs:927:16 [INFO] [stdout] | [INFO] [stdout] 927 | /// Merges two IgnoreMaps into a new IgnoreMap [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 927 - /// Merges two IgnoreMaps into a new IgnoreMap [INFO] [stdout] 927 + /// Merges two `IgnoreMaps` into a new IgnoreMap [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/libnxbd/configcheck.rs:927:38 [INFO] [stdout] | [INFO] [stdout] 927 | /// Merges two IgnoreMaps into a new IgnoreMap [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 927 - /// Merges two IgnoreMaps into a new IgnoreMap [INFO] [stdout] 927 + /// Merges two IgnoreMaps into a new `IgnoreMap` [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/nixcommands.rs:166:18 [INFO] [stdout] | [INFO] [stdout] 166 | let target = format!("ssh://{}", host); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 166 - let target = format!("ssh://{}", host); [INFO] [stdout] 166 + let target = format!("ssh://{host}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/libnxbd/nixcommands.rs:223:16 [INFO] [stdout] | [INFO] [stdout] 223 | .split(|c| c == ';' || c == '\n') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `[';', '\n']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `-W clippy::manual-pattern-char-comparison` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::manual_pattern_char_comparison)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/libnxbd/nixcommands.rs:250:28 [INFO] [stdout] | [INFO] [stdout] 250 | fs::read_to_string(&builders_value[1..]).map_err(|_| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/libnxbd/nixcommands.rs:249:24 [INFO] [stdout] | [INFO] [stdout] 249 | let builders_str = if builders_value.starts_with('@') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `-W clippy::manual-strip` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::manual_strip)]` [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 249 ~ let builders_str = if let Some() = builders_value.strip_prefix('@') { [INFO] [stdout] 250 ~ fs::read_to_string().map_err(|_| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this could be rewritten as `let...else` [INFO] [stdout] --> src/libnxbd/nixcommands.rs:380:5 [INFO] [stdout] | [INFO] [stdout] 380 | / let uptime_seconds = match lines.next().and_then(|s| { [INFO] [stdout] 381 | | s.split_whitespace() [INFO] [stdout] 382 | | .next() [INFO] [stdout] 383 | | .and_then(|n| n.parse::().ok().map(|f| f as u64)) [INFO] [stdout] ... | [INFO] [stdout] 386 | | _ => return Ok(SystemStatus::Unreachable), [INFO] [stdout] 387 | | }; [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else [INFO] [stdout] = note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_let_else)]` [INFO] [stdout] help: consider writing [INFO] [stdout] | [INFO] [stdout] 380 ~ let Some(uptime_seconds) = lines.next().and_then(|s| { [INFO] [stdout] 381 + s.split_whitespace() [INFO] [stdout] 382 + .next() [INFO] [stdout] 383 + .and_then(|n| n.parse::().ok().map(|f| f as u64)) [INFO] [stdout] 384 + }) else { return Ok(SystemStatus::Unreachable) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `f64` to `u64` may truncate the value [INFO] [stdout] --> src/libnxbd/nixcommands.rs:383:57 [INFO] [stdout] | [INFO] [stdout] 383 | .and_then(|n| n.parse::().ok().map(|f| f as u64)) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ... [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation [INFO] [stdout] = note: `-W clippy::cast-possible-truncation` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_possible_truncation)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `f64` to `u64` may lose the sign of the value [INFO] [stdout] --> src/libnxbd/nixcommands.rs:383:57 [INFO] [stdout] | [INFO] [stdout] 383 | .and_then(|n| n.parse::().ok().map(|f| f as u64)) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_sign_loss [INFO] [stdout] = note: `-W clippy::cast-sign-loss` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_sign_loss)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this could be rewritten as `let...else` [INFO] [stdout] --> src/libnxbd/nixcommands.rs:389:5 [INFO] [stdout] | [INFO] [stdout] 389 | / let failed_units = match lines.next().and_then(|s| s.parse::().ok()) { [INFO] [stdout] 390 | | Some(units) => units, [INFO] [stdout] 391 | | _ => return Ok(SystemStatus::Unreachable), [INFO] [stdout] 392 | | }; [INFO] [stdout] | |______^ help: consider writing: `let Some(failed_units) = lines.next().and_then(|s| s.parse::().ok()) else { return Ok(SystemStatus::Unreachable) };` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: more than 3 bools in a struct [INFO] [stdout] --> src/libnxbd/nixosattributes.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / pub struct ConfigInfo { [INFO] [stdout] 11 | | pub amd_microcode: bool, [INFO] [stdout] 12 | | pub boot_grub: bool, [INFO] [stdout] 13 | | pub boot_grub_generations: Option, [INFO] [stdout] ... | [INFO] [stdout] 54 | | pub wheel_needs_password: bool, [INFO] [stdout] 55 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a state machine or refactoring bools into two-variant enums [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_excessive_bools [INFO] [stdout] = note: `-W clippy::struct-excessive-bools` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::struct_excessive_bools)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/libnxbd/nixosattributes.rs:163:26 [INFO] [stdout] | [INFO] [stdout] 163 | serde_json::from_str(&stdout_str).map_err(|_| NixError::Deserialization) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `stdout_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map().unwrap_or_else()` on an `Option` value [INFO] [stdout] --> src/libnxbd/userinfo.rs:20:24 [INFO] [stdout] | [INFO] [stdout] 20 | let ssh_keys = Command::new("ssh-add") [INFO] [stdout] | ________________________^ [INFO] [stdout] 21 | | .arg("-L") [INFO] [stdout] 22 | | .output() [INFO] [stdout] 23 | | .ok() [INFO] [stdout] ... | [INFO] [stdout] 30 | | }) [INFO] [stdout] 31 | | .unwrap_or_else(Vec::new); [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or [INFO] [stdout] = note: `-W clippy::map-unwrap-or` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::map_unwrap_or)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 20 ~ let ssh_keys = Command::new("ssh-add") [INFO] [stdout] 21 + .arg("-L") [INFO] [stdout] 22 + .output() [INFO] [stdout] 23 + .ok() [INFO] [stdout] 24 + .and_then(|output| String::from_utf8(output.stdout).ok()).map_or_else(Vec::new, |output| { [INFO] [stdout] 25 + output [INFO] [stdout] 26 + .lines() [INFO] [stdout] 27 + .filter_map(SshKeyInfo::from_authorized_key) [INFO] [stdout] 28 + .collect() [INFO] [stdout] 29 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/libnxbd/userinfo.rs:31:14 [INFO] [stdout] | [INFO] [stdout] 31 | .unwrap_or_else(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `-W clippy::unwrap-or-default` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::unwrap_or_default)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | writeln!(f, " - {}: {}", system, error)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 50 - writeln!(f, " - {}: {}", system, error)?; [INFO] [stdout] 50 + writeln!(f, " - {system}: {error}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:60:21 [INFO] [stdout] | [INFO] [stdout] 60 | writeln!(f, "\nSystem {}:", system)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 60 - writeln!(f, "\nSystem {}:", system)?; [INFO] [stdout] 60 + writeln!(f, "\nSystem {system}:")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:62:25 [INFO] [stdout] | [INFO] [stdout] 62 | writeln!(f, " - {}.{}", group, check)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 62 - writeln!(f, " - {}.{}", group, check)?; [INFO] [stdout] 62 + writeln!(f, " - {group}.{check}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | / ... write!( [INFO] [stdout] 83 | | ... f, [INFO] [stdout] 84 | | ... "Hostname mismatch: system config has '{}' but local system is '{}'\nTo proceed, either:\n - Fix the hostname\n - Rerun ... [INFO] [stdout] 85 | | ... config_hostname, local_hostname [INFO] [stdout] 86 | | ... ) [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:88:29 [INFO] [stdout] | [INFO] [stdout] 88 | Self::Nix(e) => write!(f, "{}", e), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 88 - Self::Nix(e) => write!(f, "{}", e), [INFO] [stdout] 88 + Self::Nix(e) => write!(f, "{e}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:89:28 [INFO] [stdout] | [INFO] [stdout] 89 | Self::Io(e) => write!(f, "IO error: {}", e), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 89 - Self::Io(e) => write!(f, "IO error: {}", e), [INFO] [stdout] 89 + Self::Io(e) => write!(f, "IO error: {e}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function's return value is unnecessarily wrapped by `Result` [INFO] [stdout] --> src/main.rs:132:1 [INFO] [stdout] | [INFO] [stdout] 132 | / fn run_system_checks( [INFO] [stdout] 133 | | info: &ConfigInfo, [INFO] [stdout] 134 | | user_info: &UserInfo, [INFO] [stdout] 135 | | system_ignore_map: Option<&libnxbd::configcheck::IgnoreMap>, [INFO] [stdout] 136 | | ) -> Result, NixError> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps [INFO] [stdout] = note: `-W clippy::unnecessary-wraps` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::unnecessary_wraps)]` [INFO] [stdout] help: remove `Result` from the return type... [INFO] [stdout] | [INFO] [stdout] 136 - ) -> Result, NixError> { [INFO] [stdout] 136 + ) -> std::vec::Vec<(std::string::String, std::string::String)> { [INFO] [stdout] | [INFO] [stdout] help: ...and then remove the surrounding `Ok()` from returning expressions [INFO] [stdout] | [INFO] [stdout] 148 - Ok(failures) [INFO] [stdout] 148 + failures [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | eprintln!("Error: {}", e); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 153 - eprintln!("Error: {}", e); [INFO] [stdout] 153 + eprintln!("Error: {e}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:225:28 [INFO] [stdout] | [INFO] [stdout] 225 | && !arg.get_value_parser().possible_values().is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `arg.get_value_parser().possible_values().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `-W clippy::nonminimal-bool` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::nonminimal_bool)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (710/100) [INFO] [stdout] --> src/main.rs:158:1 [INFO] [stdout] | [INFO] [stdout] 158 | fn run() -> Result<(), NxbdError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] = note: `-W clippy::too-many-lines` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::too_many_lines)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:165:28 [INFO] [stdout] | [INFO] [stdout] 165 | create_dir_all(format!("{}/commands", output_dir))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 165 - create_dir_all(format!("{}/commands", output_dir))?; [INFO] [stdout] 165 + create_dir_all(format!("{output_dir}/commands"))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:166:28 [INFO] [stdout] | [INFO] [stdout] 166 | create_dir_all(format!("{}/checks", output_dir))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 166 - create_dir_all(format!("{}/checks", output_dir))?; [INFO] [stdout] 166 + create_dir_all(format!("{output_dir}/checks"))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:183:21 [INFO] [stdout] | [INFO] [stdout] 183 | content.push_str(&format!("## `nxbd {}`\n\n", subcmd.get_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] = note: `-W clippy::format-push-string` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::format_push_string)]` [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 183 - content.push_str(&format!("## `nxbd {}`\n\n", subcmd.get_name())); [INFO] [stdout] 183 + let _ = write!(content, "## `nxbd {}`\n\n", subcmd.get_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:186:25 [INFO] [stdout] | [INFO] [stdout] 186 | content.push_str(&format!("{}\n\n", long_about.to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 186 - content.push_str(&format!("{}\n\n", long_about.to_string())); [INFO] [stdout] 186 + let _ = write!(content, "{}\n\n", long_about.to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/main.rs:186:71 [INFO] [stdout] | [INFO] [stdout] 186 | content.push_str(&format!("{}\n\n", long_about.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: `-W clippy::to-string-in-format-args` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::to_string_in_format_args)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:188:21 [INFO] [stdout] | [INFO] [stdout] 188 | content.push_str(&format!("[Details]({}.md)\n\n", subcmd.get_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 188 - content.push_str(&format!("[Details]({}.md)\n\n", subcmd.get_name())); [INFO] [stdout] 188 + let _ = write!(content, "[Details]({}.md)\n\n", subcmd.get_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:194:27 [INFO] [stdout] | [INFO] [stdout] 194 | fs::write(format!("{}/commands/index.md", output_dir), content)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 194 - fs::write(format!("{}/commands/index.md", output_dir), content)?; [INFO] [stdout] 194 + fs::write(format!("{output_dir}/commands/index.md"), content)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:205:17 [INFO] [stdout] | [INFO] [stdout] 205 | content.push_str(&format!("# `nxbd {}`\n\n", subcmd.get_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 205 - content.push_str(&format!("# `nxbd {}`\n\n", subcmd.get_name())); [INFO] [stdout] 205 + let _ = write!(content, "# `nxbd {}`\n\n", subcmd.get_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:208:21 [INFO] [stdout] | [INFO] [stdout] 208 | content.push_str(&format!("{}\n\n", long_about.to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 208 - content.push_str(&format!("{}\n\n", long_about.to_string())); [INFO] [stdout] 208 + let _ = write!(content, "{}\n\n", long_about.to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/main.rs:208:67 [INFO] [stdout] | [INFO] [stdout] 208 | content.push_str(&format!("{}\n\n", long_about.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: called `map().unwrap_or_else()` on an `Option` value [INFO] [stdout] --> src/main.rs:219:32 [INFO] [stdout] | [INFO] [stdout] 219 | let help = arg [INFO] [stdout] | ________________________________^ [INFO] [stdout] 220 | | .get_help() [INFO] [stdout] 221 | | .map(|h| h.to_string()) [INFO] [stdout] 222 | | .unwrap_or_else(|| "No description available".to_string()); [INFO] [stdout] | |__________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 219 ~ let help = arg [INFO] [stdout] 220 ~ .get_help().map_or_else(|| "No description available".to_string(), |h| h.to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/main.rs:232:45 [INFO] [stdout] | [INFO] [stdout] 232 | ... .unwrap_or_else(|| String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map().unwrap_or_else()` on an `Option` value [INFO] [stdout] --> src/main.rs:227:45 [INFO] [stdout] | [INFO] [stdout] 227 | let default_value = arg [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 228 | | .get_default_values() [INFO] [stdout] 229 | | .first() [INFO] [stdout] 230 | | .and_then(|v| v.to_str()) [INFO] [stdout] 231 | | .map(|v| format!(" [default: {}]", v)) [INFO] [stdout] 232 | | .unwrap_or_else(|| String::new()); [INFO] [stdout] | |_____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 227 ~ let default_value = arg [INFO] [stdout] 228 + .get_default_values() [INFO] [stdout] 229 + .first() [INFO] [stdout] 230 ~ .and_then(|v| v.to_str()).map_or_else(|| String::new(), |v| format!(" [default: {}]", v)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:231:38 [INFO] [stdout] | [INFO] [stdout] 231 | ... .map(|v| format!(" [default: {}]", v)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 231 - .map(|v| format!(" [default: {}]", v)) [INFO] [stdout] 231 + .map(|v| format!(" [default: {v}]")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:246:42 [INFO] [stdout] | [INFO] [stdout] 246 | ... message: format!("User '{}' does not exist on target system", current_user), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] = note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]` [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 246 - message: format!("User '{}' does not exist on target system", current_user), [INFO] [stdout] 246 + message: format!("User '{current_user}' does not exist on target system"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/libnxbd/configcheck.rs:252:77 [INFO] [stdout] | [INFO] [stdout] 252 | ... .any(|local_key| user.ssh_keys.contains(&local_key)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `local_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `-W clippy::needless-borrow` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:257:50 [INFO] [stdout] | [INFO] [stdout] 257 | ... message: format!( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 258 | | ... "User '{}' exists but none of their local SSH keys are authorized", [INFO] [stdout] 259 | | ... current_user [INFO] [stdout] 260 | | ... ), [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:278:42 [INFO] [stdout] | [INFO] [stdout] 278 | ... message: format!("User '{}' does not exist on target system", current_user), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 278 - message: format!("User '{}' does not exist on target system", current_user), [INFO] [stdout] 278 + message: format!("User '{current_user}' does not exist on target system"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:284:50 [INFO] [stdout] | [INFO] [stdout] 284 | ... message: format!( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 285 | | ... "User '{}' is not in the wheel group", [INFO] [stdout] 286 | | ... current_user [INFO] [stdout] 287 | | ... ), [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> src/main.rs:235:25 [INFO] [stdout] | [INFO] [stdout] 235 | "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] = note: `-W clippy::manual-string-new` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_string_new)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:238:21 [INFO] [stdout] | [INFO] [stdout] 238 | / content.push_str(&format!( [INFO] [stdout] 239 | | "### `{}{}{}`{}\n\n{}\n\n", [INFO] [stdout] 240 | | prefix, [INFO] [stdout] 241 | | arg_name, [INFO] [stdout] ... | [INFO] [stdout] 248 | | help [INFO] [stdout] 249 | | )); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 238 ~ let _ = write!(content, "### `{}{}{}`{}\n\n{}\n\n", [INFO] [stdout] 239 + prefix, [INFO] [stdout] 240 + arg_name, [INFO] [stdout] 241 + value_hint, [INFO] [stdout] 242 + if arg.is_required_set() { [INFO] [stdout] 243 + "" [INFO] [stdout] 244 + } else { [INFO] [stdout] 245 + " (optional)" [INFO] [stdout] 246 + }, [INFO] [stdout] 247 ~ help); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:263:21 [INFO] [stdout] | [INFO] [stdout] 263 | content.push_str(&format!("## {}\n\n", group.name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 263 - content.push_str(&format!("## {}\n\n", group.name)); [INFO] [stdout] 263 + let _ = write!(content, "## {}\n\n", group.name); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:397:46 [INFO] [stdout] | [INFO] [stdout] 397 | ... message: format!( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 398 | | ... "Too many {} generations kept ({}). Consider reducing to 10 or less", [INFO] [stdout] 399 | | ... bootloader, limit [INFO] [stdout] 400 | | ... ), [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:264:21 [INFO] [stdout] | [INFO] [stdout] 264 | content.push_str(&format!("{}\n\n", group.description)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 264 - content.push_str(&format!("{}\n\n", group.description)); [INFO] [stdout] 264 + let _ = write!(content, "{}\n\n", group.description); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:404:46 [INFO] [stdout] | [INFO] [stdout] 404 | ... message: format!( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 405 | | ... "No {} generation limit set. This may prevent old generations from being garbage collected", [INFO] [stdout] 406 | | ... bootloader [INFO] [stdout] 407 | | ... ), [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:265:21 [INFO] [stdout] | [INFO] [stdout] 265 | content.push_str(&format!("[Details]({}.md)\n\n", group.id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 265 - content.push_str(&format!("[Details]({}.md)\n\n", group.id)); [INFO] [stdout] 265 + let _ = write!(content, "[Details]({}.md)\n\n", group.id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:267:27 [INFO] [stdout] | [INFO] [stdout] 267 | fs::write(format!("{}/checks/index.md", output_dir), content)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 267 - fs::write(format!("{}/checks/index.md", output_dir), content)?; [INFO] [stdout] 267 + fs::write(format!("{output_dir}/checks/index.md"), content)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:275:17 [INFO] [stdout] | [INFO] [stdout] 275 | content.push_str(&format!("# {}\n\n", group.name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 275 - content.push_str(&format!("# {}\n\n", group.name)); [INFO] [stdout] 275 + let _ = write!(content, "# {}\n\n", group.name); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:276:17 [INFO] [stdout] | [INFO] [stdout] 276 | content.push_str(&format!("{}\n\n", group.description)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 276 - content.push_str(&format!("{}\n\n", group.description)); [INFO] [stdout] 276 + let _ = write!(content, "{}\n\n", group.description); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:281:21 [INFO] [stdout] | [INFO] [stdout] 281 | / content.push_str(&format!( [INFO] [stdout] 282 | | "- [`{}` - {}](#{})\n", [INFO] [stdout] 283 | | check.id, check.description, check.id [INFO] [stdout] 284 | | )); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 281 ~ let _ = write!(content, "- [`{}` - {}](#{})\n", [INFO] [stdout] 282 ~ check.id, check.description, check.id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:291:21 [INFO] [stdout] | [INFO] [stdout] 291 | / content.push_str(&format!( [INFO] [stdout] 292 | | "### `{}`\n\n", [INFO] [stdout] 293 | | check.id, check.id [INFO] [stdout] 294 | | )); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 291 ~ let _ = write!(content, "### `{}`\n\n", [INFO] [stdout] 292 ~ check.id, check.id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:296:21 [INFO] [stdout] | [INFO] [stdout] 296 | content.push_str(&format!("{}\n\n", check.description)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 296 - content.push_str(&format!("{}\n\n", check.description)); [INFO] [stdout] 296 + let _ = write!(content, "{}\n\n", check.description); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:298:21 [INFO] [stdout] | [INFO] [stdout] 298 | content.push_str(&format!("{}\n\n", check.advice)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 298 - content.push_str(&format!("{}\n\n", check.advice)); [INFO] [stdout] 298 + let _ = write!(content, "{}\n\n", check.advice); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:304:13 [INFO] [stdout] | [INFO] [stdout] 304 | eprintln!("Documentation generated in {}", output_dir); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 304 - eprintln!("Documentation generated in {}", output_dir); [INFO] [stdout] 304 + eprintln!("Documentation generated in {output_dir}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: these match arms have identical bodies [INFO] [stdout] --> src/main.rs:982:9 [INFO] [stdout] | [INFO] [stdout] 982 | Command::Checks => {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 983 | Command::GenerateDocs { output_dir: _ } => {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is unintentional make the arms return different values [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms [INFO] [stdout] = note: `-W clippy::match-same-arms` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_same_arms)]` [INFO] [stdout] help: otherwise merge the patterns into a single arm [INFO] [stdout] | [INFO] [stdout] 982 ~ Command::Checks | Command::GenerateDocs { output_dir: _ } => {} [INFO] [stdout] 983 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:783:28 [INFO] [stdout] | [INFO] [stdout] 783 | Self::Io(e) => write!(f, "IO error: {}", e), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 783 - Self::Io(e) => write!(f, "IO error: {}", e), [INFO] [stdout] 783 + Self::Io(e) => write!(f, "IO error: {e}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:784:30 [INFO] [stdout] | [INFO] [stdout] 784 | Self::Yaml(e) => write!(f, "YAML error: {}", e), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 784 - Self::Yaml(e) => write!(f, "YAML error: {}", e), [INFO] [stdout] 784 + Self::Yaml(e) => write!(f, "YAML error: {e}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:381:33 [INFO] [stdout] | [INFO] [stdout] 381 | eprintln!("{}", format!("→ Building system: {}", system).white()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 381 - eprintln!("{}", format!("→ Building system: {}", system).white()); [INFO] [stdout] 381 + eprintln!("{}", format!("→ Building system: {system}").white()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/libnxbd/configcheck.rs:806:67 [INFO] [stdout] | [INFO] [stdout] 806 | let mut ignore_map = load_ignored_checks(path).unwrap_or_else(|| HashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `HashMap::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `-W clippy::redundant-closure` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::redundant_closure)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/main.rs:382:47 [INFO] [stdout] | [INFO] [stdout] 382 | realise_toplevel_output_paths(&[system.clone()])?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(system)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] = note: `-W clippy::cloned-ref-to-slice-refs` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::cloned_ref_to_slice_refs)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary boolean `not` operation [INFO] [stdout] --> src/libnxbd/configcheck.rs:825:9 [INFO] [stdout] | [INFO] [stdout] 825 | / if !system_map_inner.is_empty() { [INFO] [stdout] 826 | | // Replace or insert the system's ignored checks [INFO] [stdout] 827 | | ignore_map.insert(system.attribute.clone(), IgnoreMap(system_map_inner)); [INFO] [stdout] 828 | | } else { [INFO] [stdout] 829 | | // If no failures for this system, remove it from ignored checks [INFO] [stdout] 830 | | ignore_map.remove(&system.attribute); [INFO] [stdout] 831 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else [INFO] [stdout] = note: `-W clippy::if-not-else` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::if_not_else)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 825 ~ if system_map_inner.is_empty() { [INFO] [stdout] 826 + // If no failures for this system, remove it from ignored checks [INFO] [stdout] 827 + ignore_map.remove(&system.attribute); [INFO] [stdout] 828 + } else { [INFO] [stdout] 829 + // Replace or insert the system's ignored checks [INFO] [stdout] 830 + ignore_map.insert(system.attribute.clone(), IgnoreMap(system_map_inner)); [INFO] [stdout] 831 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/libnxbd/configcheck.rs:849:20 [INFO] [stdout] | [INFO] [stdout] 849 | /// Error type for parse_ignore_string [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 849 - /// Error type for parse_ignore_string [INFO] [stdout] 849 + /// Error type for `parse_ignore_string` [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:863:36 [INFO] [stdout] | [INFO] [stdout] 863 | Self::NoGroup(item) => write!(f, "No group specified in '{}' (missing '.')", item), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 863 - Self::NoGroup(item) => write!(f, "No group specified in '{}' (missing '.')", item), [INFO] [stdout] 863 + Self::NoGroup(item) => write!(f, "No group specified in '{item}' (missing '.')"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:864:39 [INFO] [stdout] | [INFO] [stdout] 864 | Self::EmptyGroup(item) => write!(f, "Empty group name in '{}'", item), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 864 - Self::EmptyGroup(item) => write!(f, "Empty group name in '{}'", item), [INFO] [stdout] 864 + Self::EmptyGroup(item) => write!(f, "Empty group name in '{item}'"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:865:39 [INFO] [stdout] | [INFO] [stdout] 865 | Self::EmptyCheck(item) => write!(f, "Empty check name in '{}'", item), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 865 - Self::EmptyCheck(item) => write!(f, "Empty check name in '{}'", item), [INFO] [stdout] 865 + Self::EmptyCheck(item) => write!(f, "Empty check name in '{item}'"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/libnxbd/configcheck.rs:870:75 [INFO] [stdout] | [INFO] [stdout] 870 | /// Parses a comma-separated list of group.check or group.* items into an IgnoreMap [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 870 - /// Parses a comma-separated list of group.check or group.* items into an IgnoreMap [INFO] [stdout] 870 + /// Parses a comma-separated list of group.check or group.* items into an `IgnoreMap` [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/libnxbd/configcheck.rs:879:16 [INFO] [stdout] | [INFO] [stdout] 879 | /// Returns an IgnoreMap where: [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 879 - /// Returns an IgnoreMap where: [INFO] [stdout] 879 + /// Returns an `IgnoreMap` where: [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/libnxbd/configcheck.rs:927:16 [INFO] [stdout] | [INFO] [stdout] 927 | /// Merges two IgnoreMaps into a new IgnoreMap [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 927 - /// Merges two IgnoreMaps into a new IgnoreMap [INFO] [stdout] 927 + /// Merges two `IgnoreMaps` into a new IgnoreMap [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: item in documentation is missing backticks [INFO] [stdout] --> src/libnxbd/configcheck.rs:927:38 [INFO] [stdout] | [INFO] [stdout] 927 | /// Merges two IgnoreMaps into a new IgnoreMap [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 927 - /// Merges two IgnoreMaps into a new IgnoreMap [INFO] [stdout] 927 + /// Merges two IgnoreMaps into a new `IgnoreMap` [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (136/100) [INFO] [stdout] --> src/libnxbd/configcheck.rs:997:5 [INFO] [stdout] | [INFO] [stdout] 997 | fn test_run_system_checks_with_ignores() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] = note: `-W clippy::too-many-lines` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::too_many_lines)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching over `()` is more explicit [INFO] [stdout] --> src/main.rs:500:40 [INFO] [stdout] | [INFO] [stdout] 500 | ... .and_then(|_| { [INFO] [stdout] | ^ help: use `()` instead of `_`: `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns [INFO] [stdout] = note: `-W clippy::ignored-unit-patterns` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::ignored_unit_patterns)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching over `()` is more explicit [INFO] [stdout] --> src/main.rs:507:40 [INFO] [stdout] | [INFO] [stdout] 507 | ... .and_then(|_| { [INFO] [stdout] | ^ help: use `()` instead of `_`: `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> src/libnxbd/configcheck.rs:1025:32 [INFO] [stdout] | [INFO] [stdout] 1025 | nix_extra_options: "".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] = note: `-W clippy::manual-string-new` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_string_new)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching over `()` is more explicit [INFO] [stdout] --> src/main.rs:533:40 [INFO] [stdout] | [INFO] [stdout] 533 | ... .and_then(|_| { [INFO] [stdout] | ^ help: use `()` instead of `_`: `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching over `()` is more explicit [INFO] [stdout] --> src/main.rs:546:40 [INFO] [stdout] | [INFO] [stdout] 546 | ... .and_then(|_| { [INFO] [stdout] | ^ help: use `()` instead of `_`: `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:1099:9 [INFO] [stdout] | [INFO] [stdout] 1099 | / assert!( [INFO] [stdout] 1100 | | failures_with_ignores.is_empty(), [INFO] [stdout] 1101 | | "Expected no failures with ignores, got: {:?}", [INFO] [stdout] 1102 | | failures_with_ignores [INFO] [stdout] 1103 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:1116:9 [INFO] [stdout] | [INFO] [stdout] 1116 | / assert_eq!( [INFO] [stdout] 1117 | | failures_with_partial_ignores.len(), [INFO] [stdout] 1118 | | 1, [INFO] [stdout] 1119 | | "Expected exactly one failure with partial ignores, got: {:?}", [INFO] [stdout] 1120 | | failures_with_partial_ignores [INFO] [stdout] 1121 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/configcheck.rs:1138:9 [INFO] [stdout] | [INFO] [stdout] 1138 | / assert_eq!( [INFO] [stdout] 1139 | | failures_with_empty_vector.len(), [INFO] [stdout] 1140 | | 1, [INFO] [stdout] 1141 | | "Expected exactly one failure with empty vector in ignore map, got: {:?}", [INFO] [stdout] 1142 | | failures_with_empty_vector [INFO] [stdout] 1143 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:595:47 [INFO] [stdout] | [INFO] [stdout] 595 | ... Err(e) => println!("failed: {}", e), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 595 - Err(e) => println!("failed: {}", e), [INFO] [stdout] 595 + Err(e) => println!("failed: {e}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:624:49 [INFO] [stdout] | [INFO] [stdout] 624 | let deploy_info = nixos_deploy_info(&system_attribute)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `system_attribute` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/main.rs:668:43 [INFO] [stdout] | [INFO] [stdout] 668 | realise_toplevel_output_paths(&[system_attribute.clone()])?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(system_attribute)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:692:59 [INFO] [stdout] | [INFO] [stdout] 692 | let file_ignored_checks = load_ignored_checks(&ignore_file); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `ignore_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:718:21 [INFO] [stdout] | [INFO] [stdout] 718 | eprintln!(" {} - {}", system, error); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 718 - eprintln!(" {} - {}", system, error); [INFO] [stdout] 718 + eprintln!(" {system} - {error}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `libnxbd::nixcommands::NixError` [INFO] [stdout] --> src/main.rs:721:28 [INFO] [stdout] | [INFO] [stdout] 721 | return Err(NixError::from(first_error).into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `NixError::from()`: `first_error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `-W clippy::useless-conversion` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:843:67 [INFO] [stdout] | [INFO] [stdout] 843 | if let Err(e) = save_failed_checks_to_ignore_file(&ignore_file, &all_results) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `ignore_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:844:21 [INFO] [stdout] | [INFO] [stdout] 844 | eprintln!("Failed to save ignore file: {}", e); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 844 - eprintln!("Failed to save ignore file: {}", e); [INFO] [stdout] 844 + eprintln!("Failed to save ignore file: {e}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:846:21 [INFO] [stdout] | [INFO] [stdout] 846 | println!("Created {} with failed checks", ignore_file); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 846 - println!("Created {} with failed checks", ignore_file); [INFO] [stdout] 846 + println!("Created {ignore_file} with failed checks"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary boolean `not` operation [INFO] [stdout] --> src/main.rs:862:25 [INFO] [stdout] | [INFO] [stdout] 862 | / if !failures.is_empty() { [INFO] [stdout] 863 | | Some(((*system).clone(), failures)) [INFO] [stdout] 864 | | } else { [INFO] [stdout] 865 | | None [INFO] [stdout] 866 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 862 ~ if failures.is_empty() { [INFO] [stdout] 863 + None [INFO] [stdout] 864 + } else { [INFO] [stdout] 865 + Some(((*system).clone(), failures)) [INFO] [stdout] 866 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:948:33 [INFO] [stdout] | [INFO] [stdout] 948 | ... format!("{} failed", failed_units).to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 948 - format!("{} failed", failed_units).to_string() [INFO] [stdout] 948 + format!("{failed_units} failed").to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:976:25 [INFO] [stdout] | [INFO] [stdout] 976 | println!(" Uptime: {}d {}h {}m", days, hours, minutes); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 976 - println!(" Uptime: {}d {}h {}m", days, hours, minutes); [INFO] [stdout] 976 + println!(" Uptime: {days}d {hours}h {minutes}m"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> src/libnxbd/flakeref.rs:67:18 [INFO] [stdout] | [INFO] [stdout] 67 | url: "".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> src/libnxbd/flakeref.rs:68:24 [INFO] [stdout] | [INFO] [stdout] 68 | attribute: "".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> src/libnxbd/flakeref.rs:77:18 [INFO] [stdout] | [INFO] [stdout] 77 | url: "".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> src/libnxbd/flakeref.rs:97:18 [INFO] [stdout] | [INFO] [stdout] 97 | url: "".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> src/libnxbd/flakeref.rs:108:24 [INFO] [stdout] | [INFO] [stdout] 108 | attribute: "".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/libnxbd/nixcommands.rs:166:18 [INFO] [stdout] | [INFO] [stdout] 166 | let target = format!("ssh://{}", host); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 166 - let target = format!("ssh://{}", host); [INFO] [stdout] 166 + let target = format!("ssh://{host}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/libnxbd/nixcommands.rs:223:16 [INFO] [stdout] | [INFO] [stdout] 223 | .split(|c| c == ';' || c == '\n') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `[';', '\n']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `-W clippy::manual-pattern-char-comparison` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::manual_pattern_char_comparison)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/libnxbd/nixcommands.rs:250:28 [INFO] [stdout] | [INFO] [stdout] 250 | fs::read_to_string(&builders_value[1..]).map_err(|_| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/libnxbd/nixcommands.rs:249:24 [INFO] [stdout] | [INFO] [stdout] 249 | let builders_str = if builders_value.starts_with('@') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `-W clippy::manual-strip` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::manual_strip)]` [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 249 ~ let builders_str = if let Some() = builders_value.strip_prefix('@') { [INFO] [stdout] 250 ~ fs::read_to_string().map_err(|_| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this could be rewritten as `let...else` [INFO] [stdout] --> src/libnxbd/nixcommands.rs:380:5 [INFO] [stdout] | [INFO] [stdout] 380 | / let uptime_seconds = match lines.next().and_then(|s| { [INFO] [stdout] 381 | | s.split_whitespace() [INFO] [stdout] 382 | | .next() [INFO] [stdout] 383 | | .and_then(|n| n.parse::().ok().map(|f| f as u64)) [INFO] [stdout] ... | [INFO] [stdout] 386 | | _ => return Ok(SystemStatus::Unreachable), [INFO] [stdout] 387 | | }; [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else [INFO] [stdout] = note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_let_else)]` [INFO] [stdout] help: consider writing [INFO] [stdout] | [INFO] [stdout] 380 ~ let Some(uptime_seconds) = lines.next().and_then(|s| { [INFO] [stdout] 381 + s.split_whitespace() [INFO] [stdout] 382 + .next() [INFO] [stdout] 383 + .and_then(|n| n.parse::().ok().map(|f| f as u64)) [INFO] [stdout] 384 + }) else { return Ok(SystemStatus::Unreachable) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `f64` to `u64` may truncate the value [INFO] [stdout] --> src/libnxbd/nixcommands.rs:383:57 [INFO] [stdout] | [INFO] [stdout] 383 | .and_then(|n| n.parse::().ok().map(|f| f as u64)) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ... [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation [INFO] [stdout] = note: `-W clippy::cast-possible-truncation` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_possible_truncation)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `f64` to `u64` may lose the sign of the value [INFO] [stdout] --> src/libnxbd/nixcommands.rs:383:57 [INFO] [stdout] | [INFO] [stdout] 383 | .and_then(|n| n.parse::().ok().map(|f| f as u64)) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_sign_loss [INFO] [stdout] = note: `-W clippy::cast-sign-loss` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_sign_loss)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this could be rewritten as `let...else` [INFO] [stdout] --> src/libnxbd/nixcommands.rs:389:5 [INFO] [stdout] | [INFO] [stdout] 389 | / let failed_units = match lines.next().and_then(|s| s.parse::().ok()) { [INFO] [stdout] 390 | | Some(units) => units, [INFO] [stdout] 391 | | _ => return Ok(SystemStatus::Unreachable), [INFO] [stdout] 392 | | }; [INFO] [stdout] | |______^ help: consider writing: `let Some(failed_units) = lines.next().and_then(|s| s.parse::().ok()) else { return Ok(SystemStatus::Unreachable) };` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: more than 3 bools in a struct [INFO] [stdout] --> src/libnxbd/nixosattributes.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / pub struct ConfigInfo { [INFO] [stdout] 11 | | pub amd_microcode: bool, [INFO] [stdout] 12 | | pub boot_grub: bool, [INFO] [stdout] 13 | | pub boot_grub_generations: Option, [INFO] [stdout] ... | [INFO] [stdout] 54 | | pub wheel_needs_password: bool, [INFO] [stdout] 55 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a state machine or refactoring bools into two-variant enums [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_excessive_bools [INFO] [stdout] = note: `-W clippy::struct-excessive-bools` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::struct_excessive_bools)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/libnxbd/nixosattributes.rs:163:26 [INFO] [stdout] | [INFO] [stdout] 163 | serde_json::from_str(&stdout_str).map_err(|_| NixError::Deserialization) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `stdout_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map().unwrap_or_else()` on an `Option` value [INFO] [stdout] --> src/libnxbd/userinfo.rs:20:24 [INFO] [stdout] | [INFO] [stdout] 20 | let ssh_keys = Command::new("ssh-add") [INFO] [stdout] | ________________________^ [INFO] [stdout] 21 | | .arg("-L") [INFO] [stdout] 22 | | .output() [INFO] [stdout] 23 | | .ok() [INFO] [stdout] ... | [INFO] [stdout] 30 | | }) [INFO] [stdout] 31 | | .unwrap_or_else(Vec::new); [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or [INFO] [stdout] = note: `-W clippy::map-unwrap-or` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::map_unwrap_or)]` [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 20 ~ let ssh_keys = Command::new("ssh-add") [INFO] [stdout] 21 + .arg("-L") [INFO] [stdout] 22 + .output() [INFO] [stdout] 23 + .ok() [INFO] [stdout] 24 + .and_then(|output| String::from_utf8(output.stdout).ok()).map_or_else(Vec::new, |output| { [INFO] [stdout] 25 + output [INFO] [stdout] 26 + .lines() [INFO] [stdout] 27 + .filter_map(SshKeyInfo::from_authorized_key) [INFO] [stdout] 28 + .collect() [INFO] [stdout] 29 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/libnxbd/userinfo.rs:31:14 [INFO] [stdout] | [INFO] [stdout] 31 | .unwrap_or_else(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `-W clippy::unwrap-or-default` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::unwrap_or_default)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | writeln!(f, " - {}: {}", system, error)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 50 - writeln!(f, " - {}: {}", system, error)?; [INFO] [stdout] 50 + writeln!(f, " - {system}: {error}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:60:21 [INFO] [stdout] | [INFO] [stdout] 60 | writeln!(f, "\nSystem {}:", system)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 60 - writeln!(f, "\nSystem {}:", system)?; [INFO] [stdout] 60 + writeln!(f, "\nSystem {system}:")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:62:25 [INFO] [stdout] | [INFO] [stdout] 62 | writeln!(f, " - {}.{}", group, check)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 62 - writeln!(f, " - {}.{}", group, check)?; [INFO] [stdout] 62 + writeln!(f, " - {group}.{check}")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | / ... write!( [INFO] [stdout] 83 | | ... f, [INFO] [stdout] 84 | | ... "Hostname mismatch: system config has '{}' but local system is '{}'\nTo proceed, either:\n - Fix the hostname\n - Rerun ... [INFO] [stdout] 85 | | ... config_hostname, local_hostname [INFO] [stdout] 86 | | ... ) [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:88:29 [INFO] [stdout] | [INFO] [stdout] 88 | Self::Nix(e) => write!(f, "{}", e), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 88 - Self::Nix(e) => write!(f, "{}", e), [INFO] [stdout] 88 + Self::Nix(e) => write!(f, "{e}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:89:28 [INFO] [stdout] | [INFO] [stdout] 89 | Self::Io(e) => write!(f, "IO error: {}", e), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 89 - Self::Io(e) => write!(f, "IO error: {}", e), [INFO] [stdout] 89 + Self::Io(e) => write!(f, "IO error: {e}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function's return value is unnecessarily wrapped by `Result` [INFO] [stdout] --> src/main.rs:132:1 [INFO] [stdout] | [INFO] [stdout] 132 | / fn run_system_checks( [INFO] [stdout] 133 | | info: &ConfigInfo, [INFO] [stdout] 134 | | user_info: &UserInfo, [INFO] [stdout] 135 | | system_ignore_map: Option<&libnxbd::configcheck::IgnoreMap>, [INFO] [stdout] 136 | | ) -> Result, NixError> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps [INFO] [stdout] = note: `-W clippy::unnecessary-wraps` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::unnecessary_wraps)]` [INFO] [stdout] help: remove `Result` from the return type... [INFO] [stdout] | [INFO] [stdout] 136 - ) -> Result, NixError> { [INFO] [stdout] 136 + ) -> std::vec::Vec<(std::string::String, std::string::String)> { [INFO] [stdout] | [INFO] [stdout] help: ...and then remove the surrounding `Ok()` from returning expressions [INFO] [stdout] | [INFO] [stdout] 148 - Ok(failures) [INFO] [stdout] 148 + failures [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | eprintln!("Error: {}", e); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 153 - eprintln!("Error: {}", e); [INFO] [stdout] 153 + eprintln!("Error: {e}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:225:28 [INFO] [stdout] | [INFO] [stdout] 225 | && !arg.get_value_parser().possible_values().is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `arg.get_value_parser().possible_values().is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `-W clippy::nonminimal-bool` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::nonminimal_bool)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many lines (710/100) [INFO] [stdout] --> src/main.rs:158:1 [INFO] [stdout] | [INFO] [stdout] 158 | fn run() -> Result<(), NxbdError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:165:28 [INFO] [stdout] | [INFO] [stdout] 165 | create_dir_all(format!("{}/commands", output_dir))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 165 - create_dir_all(format!("{}/commands", output_dir))?; [INFO] [stdout] 165 + create_dir_all(format!("{output_dir}/commands"))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:166:28 [INFO] [stdout] | [INFO] [stdout] 166 | create_dir_all(format!("{}/checks", output_dir))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 166 - create_dir_all(format!("{}/checks", output_dir))?; [INFO] [stdout] 166 + create_dir_all(format!("{output_dir}/checks"))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:183:21 [INFO] [stdout] | [INFO] [stdout] 183 | content.push_str(&format!("## `nxbd {}`\n\n", subcmd.get_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] = note: `-W clippy::format-push-string` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::format_push_string)]` [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 183 - content.push_str(&format!("## `nxbd {}`\n\n", subcmd.get_name())); [INFO] [stdout] 183 + let _ = write!(content, "## `nxbd {}`\n\n", subcmd.get_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:186:25 [INFO] [stdout] | [INFO] [stdout] 186 | content.push_str(&format!("{}\n\n", long_about.to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 186 - content.push_str(&format!("{}\n\n", long_about.to_string())); [INFO] [stdout] 186 + let _ = write!(content, "{}\n\n", long_about.to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/main.rs:186:71 [INFO] [stdout] | [INFO] [stdout] 186 | content.push_str(&format!("{}\n\n", long_about.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: `-W clippy::to-string-in-format-args` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::to_string_in_format_args)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:188:21 [INFO] [stdout] | [INFO] [stdout] 188 | content.push_str(&format!("[Details]({}.md)\n\n", subcmd.get_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 188 - content.push_str(&format!("[Details]({}.md)\n\n", subcmd.get_name())); [INFO] [stdout] 188 + let _ = write!(content, "[Details]({}.md)\n\n", subcmd.get_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:194:27 [INFO] [stdout] | [INFO] [stdout] 194 | fs::write(format!("{}/commands/index.md", output_dir), content)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 194 - fs::write(format!("{}/commands/index.md", output_dir), content)?; [INFO] [stdout] 194 + fs::write(format!("{output_dir}/commands/index.md"), content)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:205:17 [INFO] [stdout] | [INFO] [stdout] 205 | content.push_str(&format!("# `nxbd {}`\n\n", subcmd.get_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 205 - content.push_str(&format!("# `nxbd {}`\n\n", subcmd.get_name())); [INFO] [stdout] 205 + let _ = write!(content, "# `nxbd {}`\n\n", subcmd.get_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:208:21 [INFO] [stdout] | [INFO] [stdout] 208 | content.push_str(&format!("{}\n\n", long_about.to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 208 - content.push_str(&format!("{}\n\n", long_about.to_string())); [INFO] [stdout] 208 + let _ = write!(content, "{}\n\n", long_about.to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/main.rs:208:67 [INFO] [stdout] | [INFO] [stdout] 208 | content.push_str(&format!("{}\n\n", long_about.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: called `map().unwrap_or_else()` on an `Option` value [INFO] [stdout] --> src/main.rs:219:32 [INFO] [stdout] | [INFO] [stdout] 219 | let help = arg [INFO] [stdout] | ________________________________^ [INFO] [stdout] 220 | | .get_help() [INFO] [stdout] 221 | | .map(|h| h.to_string()) [INFO] [stdout] 222 | | .unwrap_or_else(|| "No description available".to_string()); [INFO] [stdout] | |__________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 219 ~ let help = arg [INFO] [stdout] 220 ~ .get_help().map_or_else(|| "No description available".to_string(), |h| h.to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/main.rs:232:45 [INFO] [stdout] | [INFO] [stdout] 232 | ... .unwrap_or_else(|| String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map().unwrap_or_else()` on an `Option` value [INFO] [stdout] --> src/main.rs:227:45 [INFO] [stdout] | [INFO] [stdout] 227 | let default_value = arg [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 228 | | .get_default_values() [INFO] [stdout] 229 | | .first() [INFO] [stdout] 230 | | .and_then(|v| v.to_str()) [INFO] [stdout] 231 | | .map(|v| format!(" [default: {}]", v)) [INFO] [stdout] 232 | | .unwrap_or_else(|| String::new()); [INFO] [stdout] | |_____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 227 ~ let default_value = arg [INFO] [stdout] 228 + .get_default_values() [INFO] [stdout] 229 + .first() [INFO] [stdout] 230 ~ .and_then(|v| v.to_str()).map_or_else(|| String::new(), |v| format!(" [default: {}]", v)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:231:38 [INFO] [stdout] | [INFO] [stdout] 231 | ... .map(|v| format!(" [default: {}]", v)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 231 - .map(|v| format!(" [default: {}]", v)) [INFO] [stdout] 231 + .map(|v| format!(" [default: {v}]")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty String is being created manually [INFO] [stdout] --> src/main.rs:235:25 [INFO] [stdout] | [INFO] [stdout] 235 | "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `String::new()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:238:21 [INFO] [stdout] | [INFO] [stdout] 238 | / content.push_str(&format!( [INFO] [stdout] 239 | | "### `{}{}{}`{}\n\n{}\n\n", [INFO] [stdout] 240 | | prefix, [INFO] [stdout] 241 | | arg_name, [INFO] [stdout] ... | [INFO] [stdout] 248 | | help [INFO] [stdout] 249 | | )); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 238 ~ let _ = write!(content, "### `{}{}{}`{}\n\n{}\n\n", [INFO] [stdout] 239 + prefix, [INFO] [stdout] 240 + arg_name, [INFO] [stdout] 241 + value_hint, [INFO] [stdout] 242 + if arg.is_required_set() { [INFO] [stdout] 243 + "" [INFO] [stdout] 244 + } else { [INFO] [stdout] 245 + " (optional)" [INFO] [stdout] 246 + }, [INFO] [stdout] 247 ~ help); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:263:21 [INFO] [stdout] | [INFO] [stdout] 263 | content.push_str(&format!("## {}\n\n", group.name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 263 - content.push_str(&format!("## {}\n\n", group.name)); [INFO] [stdout] 263 + let _ = write!(content, "## {}\n\n", group.name); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:264:21 [INFO] [stdout] | [INFO] [stdout] 264 | content.push_str(&format!("{}\n\n", group.description)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 264 - content.push_str(&format!("{}\n\n", group.description)); [INFO] [stdout] 264 + let _ = write!(content, "{}\n\n", group.description); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:265:21 [INFO] [stdout] | [INFO] [stdout] 265 | content.push_str(&format!("[Details]({}.md)\n\n", group.id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 265 - content.push_str(&format!("[Details]({}.md)\n\n", group.id)); [INFO] [stdout] 265 + let _ = write!(content, "[Details]({}.md)\n\n", group.id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:267:27 [INFO] [stdout] | [INFO] [stdout] 267 | fs::write(format!("{}/checks/index.md", output_dir), content)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 267 - fs::write(format!("{}/checks/index.md", output_dir), content)?; [INFO] [stdout] 267 + fs::write(format!("{output_dir}/checks/index.md"), content)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:275:17 [INFO] [stdout] | [INFO] [stdout] 275 | content.push_str(&format!("# {}\n\n", group.name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 275 - content.push_str(&format!("# {}\n\n", group.name)); [INFO] [stdout] 275 + let _ = write!(content, "# {}\n\n", group.name); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:276:17 [INFO] [stdout] | [INFO] [stdout] 276 | content.push_str(&format!("{}\n\n", group.description)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 276 - content.push_str(&format!("{}\n\n", group.description)); [INFO] [stdout] 276 + let _ = write!(content, "{}\n\n", group.description); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:281:21 [INFO] [stdout] | [INFO] [stdout] 281 | / content.push_str(&format!( [INFO] [stdout] 282 | | "- [`{}` - {}](#{})\n", [INFO] [stdout] 283 | | check.id, check.description, check.id [INFO] [stdout] 284 | | )); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 281 ~ let _ = write!(content, "- [`{}` - {}](#{})\n", [INFO] [stdout] 282 ~ check.id, check.description, check.id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:291:21 [INFO] [stdout] | [INFO] [stdout] 291 | / content.push_str(&format!( [INFO] [stdout] 292 | | "### `{}`\n\n", [INFO] [stdout] 293 | | check.id, check.id [INFO] [stdout] 294 | | )); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 291 ~ let _ = write!(content, "### `{}`\n\n", [INFO] [stdout] 292 ~ check.id, check.id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:296:21 [INFO] [stdout] | [INFO] [stdout] 296 | content.push_str(&format!("{}\n\n", check.description)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 296 - content.push_str(&format!("{}\n\n", check.description)); [INFO] [stdout] 296 + let _ = write!(content, "{}\n\n", check.description); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!(..)` appended to existing `String` [INFO] [stdout] --> src/main.rs:298:21 [INFO] [stdout] | [INFO] [stdout] 298 | content.push_str(&format!("{}\n\n", check.advice)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: you may need to import the `std::fmt::Write` trait [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string [INFO] [stdout] help: consider using `write!` to avoid the extra allocation [INFO] [stdout] | [INFO] [stdout] 298 - content.push_str(&format!("{}\n\n", check.advice)); [INFO] [stdout] 298 + let _ = write!(content, "{}\n\n", check.advice); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:304:13 [INFO] [stdout] | [INFO] [stdout] 304 | eprintln!("Documentation generated in {}", output_dir); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 304 - eprintln!("Documentation generated in {}", output_dir); [INFO] [stdout] 304 + eprintln!("Documentation generated in {output_dir}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: these match arms have identical bodies [INFO] [stdout] --> src/main.rs:982:9 [INFO] [stdout] | [INFO] [stdout] 982 | Command::Checks => {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 983 | Command::GenerateDocs { output_dir: _ } => {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is unintentional make the arms return different values [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms [INFO] [stdout] = note: `-W clippy::match-same-arms` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_same_arms)]` [INFO] [stdout] help: otherwise merge the patterns into a single arm [INFO] [stdout] | [INFO] [stdout] 982 ~ Command::Checks | Command::GenerateDocs { output_dir: _ } => {} [INFO] [stdout] 983 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:381:33 [INFO] [stdout] | [INFO] [stdout] 381 | eprintln!("{}", format!("→ Building system: {}", system).white()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 381 - eprintln!("{}", format!("→ Building system: {}", system).white()); [INFO] [stdout] 381 + eprintln!("{}", format!("→ Building system: {system}").white()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/main.rs:382:47 [INFO] [stdout] | [INFO] [stdout] 382 | realise_toplevel_output_paths(&[system.clone()])?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(system)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] = note: `-W clippy::cloned-ref-to-slice-refs` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::cloned_ref_to_slice_refs)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching over `()` is more explicit [INFO] [stdout] --> src/main.rs:500:40 [INFO] [stdout] | [INFO] [stdout] 500 | ... .and_then(|_| { [INFO] [stdout] | ^ help: use `()` instead of `_`: `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns [INFO] [stdout] = note: `-W clippy::ignored-unit-patterns` implied by `-W clippy::pedantic` [INFO] [stdout] = help: to override `-W clippy::pedantic` add `#[allow(clippy::ignored_unit_patterns)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching over `()` is more explicit [INFO] [stdout] --> src/main.rs:507:40 [INFO] [stdout] | [INFO] [stdout] 507 | ... .and_then(|_| { [INFO] [stdout] | ^ help: use `()` instead of `_`: `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching over `()` is more explicit [INFO] [stdout] --> src/main.rs:533:40 [INFO] [stdout] | [INFO] [stdout] 533 | ... .and_then(|_| { [INFO] [stdout] | ^ help: use `()` instead of `_`: `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching over `()` is more explicit [INFO] [stdout] --> src/main.rs:546:40 [INFO] [stdout] | [INFO] [stdout] 546 | ... .and_then(|_| { [INFO] [stdout] | ^ help: use `()` instead of `_`: `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:595:47 [INFO] [stdout] | [INFO] [stdout] 595 | ... Err(e) => println!("failed: {}", e), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 595 - Err(e) => println!("failed: {}", e), [INFO] [stdout] 595 + Err(e) => println!("failed: {e}"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:624:49 [INFO] [stdout] | [INFO] [stdout] 624 | let deploy_info = nixos_deploy_info(&system_attribute)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `system_attribute` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/main.rs:668:43 [INFO] [stdout] | [INFO] [stdout] 668 | realise_toplevel_output_paths(&[system_attribute.clone()])?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(system_attribute)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:692:59 [INFO] [stdout] | [INFO] [stdout] 692 | let file_ignored_checks = load_ignored_checks(&ignore_file); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `ignore_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:718:21 [INFO] [stdout] | [INFO] [stdout] 718 | eprintln!(" {} - {}", system, error); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 718 - eprintln!(" {} - {}", system, error); [INFO] [stdout] 718 + eprintln!(" {system} - {error}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `libnxbd::nixcommands::NixError` [INFO] [stdout] --> src/main.rs:721:28 [INFO] [stdout] | [INFO] [stdout] 721 | return Err(NixError::from(first_error).into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `NixError::from()`: `first_error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `-W clippy::useless-conversion` implied by `-W clippy::all` [INFO] [stdout] = help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:843:67 [INFO] [stdout] | [INFO] [stdout] 843 | if let Err(e) = save_failed_checks_to_ignore_file(&ignore_file, &all_results) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `ignore_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:844:21 [INFO] [stdout] | [INFO] [stdout] 844 | eprintln!("Failed to save ignore file: {}", e); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 844 - eprintln!("Failed to save ignore file: {}", e); [INFO] [stdout] 844 + eprintln!("Failed to save ignore file: {e}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:846:21 [INFO] [stdout] | [INFO] [stdout] 846 | println!("Created {} with failed checks", ignore_file); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 846 - println!("Created {} with failed checks", ignore_file); [INFO] [stdout] 846 + println!("Created {ignore_file} with failed checks"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary boolean `not` operation [INFO] [stdout] --> src/main.rs:862:25 [INFO] [stdout] | [INFO] [stdout] 862 | / if !failures.is_empty() { [INFO] [stdout] 863 | | Some(((*system).clone(), failures)) [INFO] [stdout] 864 | | } else { [INFO] [stdout] 865 | | None [INFO] [stdout] 866 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 862 ~ if failures.is_empty() { [INFO] [stdout] 863 + None [INFO] [stdout] 864 + } else { [INFO] [stdout] 865 + Some(((*system).clone(), failures)) [INFO] [stdout] 866 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:948:33 [INFO] [stdout] | [INFO] [stdout] 948 | ... format!("{} failed", failed_units).to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 948 - format!("{} failed", failed_units).to_string() [INFO] [stdout] 948 + format!("{failed_units} failed").to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variables can be used directly in the `format!` string [INFO] [stdout] --> src/main.rs:976:25 [INFO] [stdout] | [INFO] [stdout] 976 | println!(" Uptime: {}d {}h {}m", days, hours, minutes); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 976 - println!(" Uptime: {}d {}h {}m", days, hours, minutes); [INFO] [stdout] 976 + println!(" Uptime: {days}d {hours}h {minutes}m"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.67s [INFO] running `Command { std: "docker" "inspect" "83ac978fc15a6a61364052594b097443cbf0d3224295a98791e6d748750da069", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "83ac978fc15a6a61364052594b097443cbf0d3224295a98791e6d748750da069", kill_on_drop: false }` [INFO] [stdout] 83ac978fc15a6a61364052594b097443cbf0d3224295a98791e6d748750da069