[INFO] cloning repository https://github.com/SahutoL/macdiet [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/SahutoL/macdiet" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSahutoL%2Fmacdiet", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSahutoL%2Fmacdiet'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6f934143487b8419f3d78db61a32d261b6432b0c [INFO] linting SahutoL/macdiet against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSahutoL%2Fmacdiet" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/SahutoL/macdiet [INFO] finished tweaking git repo https://github.com/SahutoL/macdiet [INFO] tweaked toml for git repo https://github.com/SahutoL/macdiet written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/SahutoL/macdiet 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/SahutoL/macdiet 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] Downloading crates ... [INFO] [stderr] Downloaded stability v0.2.1 [INFO] [stderr] Downloaded zmij v1.0.7 [INFO] [stderr] Downloaded ratatui v0.26.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] eb6f9ca7fe305c02198ad0b10af707fbdf2dd9f6b1e6aa585b9caa4fd7c66612 [INFO] running `Command { std: "docker" "start" "-a" "eb6f9ca7fe305c02198ad0b10af707fbdf2dd9f6b1e6aa585b9caa4fd7c66612", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "eb6f9ca7fe305c02198ad0b10af707fbdf2dd9f6b1e6aa585b9caa4fd7c66612", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "eb6f9ca7fe305c02198ad0b10af707fbdf2dd9f6b1e6aa585b9caa4fd7c66612", kill_on_drop: false }` [INFO] [stdout] eb6f9ca7fe305c02198ad0b10af707fbdf2dd9f6b1e6aa585b9caa4fd7c66612 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] e213f0c2d887163ba539ca32028b5f01f0ecae1ef45f345e1a2a83bbe3962dc0 [INFO] running `Command { std: "docker" "start" "-a" "e213f0c2d887163ba539ca32028b5f01f0ecae1ef45f345e1a2a83bbe3962dc0", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.104 [INFO] [stderr] Compiling quote v1.0.42 [INFO] [stderr] Compiling libc v0.2.178 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Checking memchr v2.7.6 [INFO] [stderr] Checking utf8parse v0.2.2 [INFO] [stderr] Compiling signal-hook v0.3.18 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking anstyle-query v1.1.5 [INFO] [stderr] Checking is_terminal_polyfill v1.70.2 [INFO] [stderr] Checking colorchoice v1.0.4 [INFO] [stderr] Checking anstyle v1.0.13 [INFO] [stderr] Checking clap_lex v0.7.6 [INFO] [stderr] Compiling portable-atomic v1.13.0 [INFO] [stderr] Checking foldhash v0.1.5 [INFO] [stderr] Checking strsim v0.11.1 [INFO] [stderr] Compiling zmij v1.0.7 [INFO] [stderr] Checking indexmap v2.12.1 [INFO] [stderr] Checking castaway v0.2.4 [INFO] [stderr] Checking anstyle-parse v0.2.7 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Compiling time-core v0.1.6 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking toml_write v0.1.2 [INFO] [stderr] Checking unicode-width v0.2.2 [INFO] [stderr] Checking hashbrown v0.15.5 [INFO] [stderr] Checking unicode-width v0.1.14 [INFO] [stderr] Checking winnow v0.7.14 [INFO] [stderr] Checking regex-syntax v0.8.8 [INFO] [stderr] Compiling serde_json v1.0.148 [INFO] [stderr] Checking unicode-segmentation v1.12.0 [INFO] [stderr] Checking deranged v0.5.5 [INFO] [stderr] Compiling time-macros v0.2.24 [INFO] [stderr] Checking compact_str v0.7.1 [INFO] [stderr] Checking clap_builder v4.5.53 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking bstr v1.12.1 [INFO] [stderr] Checking cassowary v0.3.0 [INFO] [stderr] Compiling syn v2.0.112 [INFO] [stderr] Checking walkdir v2.5.0 [INFO] [stderr] Checking lru v0.12.5 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking console v0.15.11 [INFO] [stderr] Checking wait-timeout v0.2.1 [INFO] [stderr] Checking time v0.3.44 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Checking unicode-truncate v1.1.0 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking signal-hook-mio v0.2.5 [INFO] [stderr] Checking indicatif v0.17.11 [INFO] [stderr] Checking crossterm v0.27.0 [INFO] [stderr] Checking globset v0.4.18 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Compiling stability v0.2.1 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking ratatui v0.26.3 [INFO] [stderr] Checking clap v4.5.53 [INFO] [stderr] Checking clap_complete v4.5.64 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Checking macdiet v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `is_uuid` [INFO] [stdout] --> src/cli/mod.rs:374:21 [INFO] [stdout] | [INFO] [stdout] 374 | let is_uuid = crate::snapshots::is_uuid(id); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_is_uuid` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list_cmd` [INFO] [stdout] --> src/cli/mod.rs:375:21 [INFO] [stdout] | [INFO] [stdout] 375 | let list_cmd = "diskutil apfs listSnapshots /"; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_list_cmd` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `is_uuid` [INFO] [stdout] --> src/cli/mod.rs:374:21 [INFO] [stdout] | [INFO] [stdout] 374 | let is_uuid = crate::snapshots::is_uuid(id); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_is_uuid` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list_cmd` [INFO] [stdout] --> src/cli/mod.rs:375:21 [INFO] [stdout] | [INFO] [stdout] 375 | let list_cmd = "diskutil apfs listSnapshots /"; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_list_cmd` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home_dir` [INFO] [stdout] --> src/tui/mod.rs:2848:9 [INFO] [stdout] | [INFO] [stdout] 2848 | let home_dir = app.home_dir.clone(); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_home_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list_cmd_str` [INFO] [stdout] --> src/tui/mod.rs:3061:17 [INFO] [stdout] | [INFO] [stdout] 3061 | let list_cmd_str = "diskutil apfs listSnapshots /"; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_list_cmd_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home_dir` [INFO] [stdout] --> src/tui/mod.rs:3057:9 [INFO] [stdout] | [INFO] [stdout] 3057 | let home_dir = app.home_dir.clone(); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_home_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home_dir` [INFO] [stdout] --> src/tui/mod.rs:2848:9 [INFO] [stdout] | [INFO] [stdout] 2848 | let home_dir = app.home_dir.clone(); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_home_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list_cmd_str` [INFO] [stdout] --> src/tui/mod.rs:3061:17 [INFO] [stdout] | [INFO] [stdout] 3061 | let list_cmd_str = "diskutil apfs listSnapshots /"; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_list_cmd_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home_dir` [INFO] [stdout] --> src/tui/mod.rs:3057:9 [INFO] [stdout] | [INFO] [stdout] 3057 | let home_dir = app.home_dir.clone(); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_home_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `show_apfs_disk_utility_action` is never used [INFO] [stdout] --> src/rules/mod.rs:1115:4 [INFO] [stdout] | [INFO] [stdout] 1115 | fn show_apfs_disk_utility_action() -> ActionPlan { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `tmutil_unobserved_action` is never used [INFO] [stdout] --> src/rules/mod.rs:1144:4 [INFO] [stdout] | [INFO] [stdout] 1144 | fn tmutil_unobserved_action() -> ActionPlan { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_diskutil_snapshot_count` is never used [INFO] [stdout] --> src/rules/mod.rs:1162:4 [INFO] [stdout] | [INFO] [stdout] 1162 | fn parse_diskutil_snapshot_count(stdout: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_tmutil_local_snapshot_count` is never used [INFO] [stdout] --> src/rules/mod.rs:1183:4 [INFO] [stdout] | [INFO] [stdout] 1183 | fn parse_tmutil_local_snapshot_count(stdout: &str) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_snapshot_delete_entries` is never used [INFO] [stdout] --> src/tui/mod.rs:6739:4 [INFO] [stdout] | [INFO] [stdout] 6739 | fn build_snapshot_delete_entries(stdout: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/actions/mod.rs:395:5 [INFO] [stdout] | [INFO] [stdout] 395 | / if looks_like_ownership_issue { [INFO] [stdout] 396 | | if let Some(owner) = detect_preferred_owner_for_repair() { [INFO] [stdout] 397 | | let mut chown_args = vec!["-R".to_string(), owner.clone()]; [INFO] [stdout] 398 | | chown_args.extend(paths.iter().cloned()); [INFO] [stdout] ... | [INFO] [stdout] 419 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 395 ~ if looks_like_ownership_issue [INFO] [stdout] 396 ~ && let Some(owner) = detect_preferred_owner_for_repair() { [INFO] [stdout] 397 | let mut chown_args = vec!["-R".to_string(), owner.clone()]; [INFO] [stdout] ... [INFO] [stdout] 417 | }); [INFO] [stdout] 418 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/actions/mod.rs:434:5 [INFO] [stdout] | [INFO] [stdout] 434 | / if let Ok(home) = std::env::var("HOME") { [INFO] [stdout] 435 | | if let Some(name) = std::path::Path::new(&home) [INFO] [stdout] 436 | | .file_name() [INFO] [stdout] 437 | | .and_then(|s| s.to_str()) [INFO] [stdout] ... | [INFO] [stdout] 444 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 434 ~ if let Ok(home) = std::env::var("HOME") [INFO] [stdout] 435 ~ && let Some(name) = std::path::Path::new(&home) [INFO] [stdout] 436 | .file_name() [INFO] [stdout] ... [INFO] [stdout] 442 | } [INFO] [stdout] 443 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/actions/mod.rs:435:9 [INFO] [stdout] | [INFO] [stdout] 435 | / if let Some(name) = std::path::Path::new(&home) [INFO] [stdout] 436 | | .file_name() [INFO] [stdout] 437 | | .and_then(|s| s.to_str()) [INFO] [stdout] 438 | | .map(str::trim) [INFO] [stdout] ... | [INFO] [stdout] 443 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 438 ~ .map(str::trim) [INFO] [stdout] 439 ~ && !name.is_empty() { [INFO] [stdout] 440 | candidates.push(name.to_string()); [INFO] [stdout] 441 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cli/mod.rs:377:20 [INFO] [stdout] | [INFO] [stdout] 377 | if !cli.dry_run && !(ui_cfg.stdin_is_tty && ui_cfg.stdout_is_tty) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(cli.dry_run || ui_cfg.stdin_is_tty && ui_cfg.stdout_is_tty)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `show_apfs_disk_utility_action` is never used [INFO] [stdout] --> src/rules/mod.rs:1115:4 [INFO] [stdout] | [INFO] [stdout] 1115 | fn show_apfs_disk_utility_action() -> ActionPlan { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `tmutil_unobserved_action` is never used [INFO] [stdout] --> src/rules/mod.rs:1144:4 [INFO] [stdout] | [INFO] [stdout] 1144 | fn tmutil_unobserved_action() -> ActionPlan { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/actions/mod.rs:395:5 [INFO] [stdout] | [INFO] [stdout] 395 | / if looks_like_ownership_issue { [INFO] [stdout] 396 | | if let Some(owner) = detect_preferred_owner_for_repair() { [INFO] [stdout] 397 | | let mut chown_args = vec!["-R".to_string(), owner.clone()]; [INFO] [stdout] 398 | | chown_args.extend(paths.iter().cloned()); [INFO] [stdout] ... | [INFO] [stdout] 419 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 395 ~ if looks_like_ownership_issue [INFO] [stdout] 396 ~ && let Some(owner) = detect_preferred_owner_for_repair() { [INFO] [stdout] 397 | let mut chown_args = vec!["-R".to_string(), owner.clone()]; [INFO] [stdout] ... [INFO] [stdout] 417 | }); [INFO] [stdout] 418 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/actions/mod.rs:434:5 [INFO] [stdout] | [INFO] [stdout] 434 | / if let Ok(home) = std::env::var("HOME") { [INFO] [stdout] 435 | | if let Some(name) = std::path::Path::new(&home) [INFO] [stdout] 436 | | .file_name() [INFO] [stdout] 437 | | .and_then(|s| s.to_str()) [INFO] [stdout] ... | [INFO] [stdout] 444 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 434 ~ if let Ok(home) = std::env::var("HOME") [INFO] [stdout] 435 ~ && let Some(name) = std::path::Path::new(&home) [INFO] [stdout] 436 | .file_name() [INFO] [stdout] ... [INFO] [stdout] 442 | } [INFO] [stdout] 443 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/actions/mod.rs:435:9 [INFO] [stdout] | [INFO] [stdout] 435 | / if let Some(name) = std::path::Path::new(&home) [INFO] [stdout] 436 | | .file_name() [INFO] [stdout] 437 | | .and_then(|s| s.to_str()) [INFO] [stdout] 438 | | .map(str::trim) [INFO] [stdout] ... | [INFO] [stdout] 443 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 438 ~ .map(str::trim) [INFO] [stdout] 439 ~ && !name.is_empty() { [INFO] [stdout] 440 | candidates.push(name.to_string()); [INFO] [stdout] 441 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/config/mod.rs:149:5 [INFO] [stdout] | [INFO] [stdout] 149 | / if let Some(fix) = raw.fix { [INFO] [stdout] 150 | | if let Some(default_risk_max) = fix.default_risk_max { [INFO] [stdout] 151 | | cfg.fix.default_risk_max = default_risk_max; [INFO] [stdout] 152 | | } [INFO] [stdout] 153 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 149 ~ if let Some(fix) = raw.fix [INFO] [stdout] 150 ~ && let Some(default_risk_max) = fix.default_risk_max { [INFO] [stdout] 151 | cfg.fix.default_risk_max = default_risk_max; [INFO] [stdout] 152 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/config/mod.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | / if let Some(privacy) = raw.privacy { [INFO] [stdout] 156 | | if let Some(mask_home) = privacy.mask_home { [INFO] [stdout] 157 | | cfg.privacy.mask_home = mask_home; [INFO] [stdout] 158 | | } [INFO] [stdout] 159 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 155 ~ if let Some(privacy) = raw.privacy [INFO] [stdout] 156 ~ && let Some(mask_home) = privacy.mask_home { [INFO] [stdout] 157 | cfg.privacy.mask_home = mask_home; [INFO] [stdout] 158 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/config/mod.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | / if let Some(report) = raw.report { [INFO] [stdout] 162 | | if let Some(include_evidence) = report.include_evidence { [INFO] [stdout] 163 | | cfg.report.include_evidence = include_evidence; [INFO] [stdout] 164 | | } [INFO] [stdout] 165 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 161 ~ if let Some(report) = raw.report [INFO] [stdout] 162 ~ && let Some(include_evidence) = report.include_evidence { [INFO] [stdout] 163 | cfg.report.include_evidence = include_evidence; [INFO] [stdout] 164 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cli/mod.rs:377:20 [INFO] [stdout] | [INFO] [stdout] 377 | if !cli.dry_run && !(ui_cfg.stdin_is_tty && ui_cfg.stdout_is_tty) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(cli.dry_run || ui_cfg.stdin_is_tty && ui_cfg.stdout_is_tty)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/logs/mod.rs:213:1 [INFO] [stdout] | [INFO] [stdout] 213 | / pub fn write_snapshots_thin_log( [INFO] [stdout] 214 | | home_dir: &Path, [INFO] [stdout] 215 | | started_at: OffsetDateTime, [INFO] [stdout] 216 | | finished_at: OffsetDateTime, [INFO] [stdout] ... | [INFO] [stdout] 222 | | error: Option, [INFO] [stdout] 223 | | ) -> Result { [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (13/7) [INFO] [stdout] --> src/logs/mod.rs:263:1 [INFO] [stdout] | [INFO] [stdout] 263 | / pub fn write_snapshots_delete_log( [INFO] [stdout] 264 | | home_dir: &Path, [INFO] [stdout] 265 | | started_at: OffsetDateTime, [INFO] [stdout] 266 | | finished_at: OffsetDateTime, [INFO] [stdout] ... | [INFO] [stdout] 276 | | delete_error: Option, [INFO] [stdout] 277 | | ) -> Result { [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/logs/mod.rs:293:50 [INFO] [stdout] | [INFO] [stdout] 293 | let status = if list_attempt.error.is_some() { [INFO] [stdout] | __________________________________________________^ [INFO] [stdout] 294 | | "error" [INFO] [stdout] 295 | | } else if list_attempt.exit_code != Some(0) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/logs/mod.rs:295:49 [INFO] [stdout] | [INFO] [stdout] 295 | } else if list_attempt.exit_code != Some(0) { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 296 | | "error" [INFO] [stdout] 297 | | } else if let Some(delete_attempt) = &delete_attempt { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/logs/mod.rs:298:43 [INFO] [stdout] | [INFO] [stdout] 298 | if delete_attempt.error.is_some() { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 299 | | "error" [INFO] [stdout] 300 | | } else if delete_attempt.exit_code != Some(0) { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/logs/mod.rs:300:55 [INFO] [stdout] | [INFO] [stdout] 300 | } else if delete_attempt.exit_code != Some(0) { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 301 | | "error" [INFO] [stdout] 302 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/config/mod.rs:149:5 [INFO] [stdout] | [INFO] [stdout] 149 | / if let Some(fix) = raw.fix { [INFO] [stdout] 150 | | if let Some(default_risk_max) = fix.default_risk_max { [INFO] [stdout] 151 | | cfg.fix.default_risk_max = default_risk_max; [INFO] [stdout] 152 | | } [INFO] [stdout] 153 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 149 ~ if let Some(fix) = raw.fix [INFO] [stdout] 150 ~ && let Some(default_risk_max) = fix.default_risk_max { [INFO] [stdout] 151 | cfg.fix.default_risk_max = default_risk_max; [INFO] [stdout] 152 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/config/mod.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | / if let Some(privacy) = raw.privacy { [INFO] [stdout] 156 | | if let Some(mask_home) = privacy.mask_home { [INFO] [stdout] 157 | | cfg.privacy.mask_home = mask_home; [INFO] [stdout] 158 | | } [INFO] [stdout] 159 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 155 ~ if let Some(privacy) = raw.privacy [INFO] [stdout] 156 ~ && let Some(mask_home) = privacy.mask_home { [INFO] [stdout] 157 | cfg.privacy.mask_home = mask_home; [INFO] [stdout] 158 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/config/mod.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | / if let Some(report) = raw.report { [INFO] [stdout] 162 | | if let Some(include_evidence) = report.include_evidence { [INFO] [stdout] 163 | | cfg.report.include_evidence = include_evidence; [INFO] [stdout] 164 | | } [INFO] [stdout] 165 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 161 ~ if let Some(report) = raw.report [INFO] [stdout] 162 ~ && let Some(include_evidence) = report.include_evidence { [INFO] [stdout] 163 | cfg.report.include_evidence = include_evidence; [INFO] [stdout] 164 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/platform/mod.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | / return OsInfo { [INFO] [stdout] 198 | | name: "unknown".to_string(), [INFO] [stdout] 199 | | version: "unknown".to_string(), [INFO] [stdout] 200 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 197 ~ OsInfo { [INFO] [stdout] 198 + name: "unknown".to_string(), [INFO] [stdout] 199 + version: "unknown".to_string(), [INFO] [stdout] 200 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/rules/mod.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | / let mut out = Vec::new(); [INFO] [stdout] 53 | | out.push(tm_local_snapshots_status(ctx)); [INFO] [stdout] 54 | | out.push(apfs_snapshots_status(ctx)); [INFO] [stdout] | |_________________________________________^ help: consider using the `vec![]` macro: `let out = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rules/mod.rs:814:9 [INFO] [stdout] | [INFO] [stdout] 814 | / return RuleOutput { [INFO] [stdout] 815 | | finding, [INFO] [stdout] 816 | | actions: vec![], [INFO] [stdout] 817 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 814 ~ RuleOutput { [INFO] [stdout] 815 + finding, [INFO] [stdout] 816 + actions: vec![], [INFO] [stdout] 817 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rules/mod.rs:977:9 [INFO] [stdout] | [INFO] [stdout] 977 | / return RuleOutput { [INFO] [stdout] 978 | | finding, [INFO] [stdout] 979 | | actions: vec![], [INFO] [stdout] 980 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 977 ~ RuleOutput { [INFO] [stdout] 978 + finding, [INFO] [stdout] 979 + actions: vec![], [INFO] [stdout] 980 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/scan/mod.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | / if let Some(d) = deadline { [INFO] [stdout] 51 | | if d < end { [INFO] [stdout] 52 | | end = d; [INFO] [stdout] 53 | | } [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 50 ~ if let Some(d) = deadline [INFO] [stdout] 51 ~ && d < end { [INFO] [stdout] 52 | end = d; [INFO] [stdout] 53 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/snapshots/mod.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | / if lower.contains("uuid") { [INFO] [stdout] 104 | | if let Some(uuid) = first_uuid_in_line(trimmed) { [INFO] [stdout] 105 | | cur.uuids.insert(uuid.to_ascii_lowercase()); [INFO] [stdout] 106 | | } [INFO] [stdout] 107 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 103 ~ if lower.contains("uuid") [INFO] [stdout] 104 ~ && let Some(uuid) = first_uuid_in_line(trimmed) { [INFO] [stdout] 105 | cur.uuids.insert(uuid.to_ascii_lowercase()); [INFO] [stdout] 106 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:947:21 [INFO] [stdout] | [INFO] [stdout] 947 | / if key.kind == KeyEventKind::Press { [INFO] [stdout] 948 | | if handle_key(&mut app, &engine, key)? { [INFO] [stdout] 949 | | break; [INFO] [stdout] 950 | | } [INFO] [stdout] 951 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 946 ~ Event::Key(key) [INFO] [stdout] 947 ~ if key.kind == KeyEventKind::Press => { [INFO] [stdout] 948 | if handle_key(&mut app, &engine, key)? { [INFO] [stdout] 949 | break; [INFO] [stdout] 950 | } [INFO] [stdout] 951 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tui/mod.rs:947:21 [INFO] [stdout] | [INFO] [stdout] 947 | / if key.kind == KeyEventKind::Press { [INFO] [stdout] 948 | | if handle_key(&mut app, &engine, key)? { [INFO] [stdout] 949 | | break; [INFO] [stdout] 950 | | } [INFO] [stdout] 951 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 947 ~ if key.kind == KeyEventKind::Press [INFO] [stdout] 948 ~ && handle_key(&mut app, &engine, key)? { [INFO] [stdout] 949 | break; [INFO] [stdout] 950 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:1059:17 [INFO] [stdout] | [INFO] [stdout] 1059 | / if !key.modifiers.contains(KeyModifiers::CONTROL) [INFO] [stdout] 1060 | | && !key.modifiers.contains(KeyModifiers::ALT) [INFO] [stdout] 1061 | | { [INFO] [stdout] 1062 | | app.filter.push(c); [INFO] [stdout] ... | [INFO] [stdout] 1072 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1058 ~ KeyCode::Char(c) [INFO] [stdout] 1059 | if !key.modifiers.contains(KeyModifiers::CONTROL) [INFO] [stdout] 1060 | && !key.modifiers.contains(KeyModifiers::ALT) [INFO] [stdout] 1061 ~ => { [INFO] [stdout] 1062 | app.filter.push(c); [INFO] [stdout] ... [INFO] [stdout] 1071 | } [INFO] [stdout] 1072 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:1096:17 [INFO] [stdout] | [INFO] [stdout] 1096 | / if app.query_mode { [INFO] [stdout] 1097 | | app.query_mode = false; [INFO] [stdout] 1098 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1095 ~ KeyCode::Esc [INFO] [stdout] 1096 ~ if app.query_mode => { [INFO] [stdout] 1097 | app.query_mode = false; [INFO] [stdout] 1098 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:1117:17 [INFO] [stdout] | [INFO] [stdout] 1117 | / if app.query_mode { [INFO] [stdout] 1118 | | app.query.pop(); [INFO] [stdout] 1119 | | app.ensure_command_selection_in_range(); [INFO] [stdout] 1120 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1116 ~ KeyCode::Backspace [INFO] [stdout] 1117 ~ if app.query_mode => { [INFO] [stdout] 1118 | app.query.pop(); [INFO] [stdout] 1119 | app.ensure_command_selection_in_range(); [INFO] [stdout] 1120 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:1123:17 [INFO] [stdout] | [INFO] [stdout] 1123 | / if app.query_mode { [INFO] [stdout] 1124 | | app.query.push(c); [INFO] [stdout] 1125 | | app.ensure_command_selection_in_range(); [INFO] [stdout] 1126 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1122 ~ KeyCode::Char(c) [INFO] [stdout] 1123 ~ if app.query_mode => { [INFO] [stdout] 1124 | app.query.push(c); [INFO] [stdout] 1125 | app.ensure_command_selection_in_range(); [INFO] [stdout] 1126 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:1140:21 [INFO] [stdout] | [INFO] [stdout] 1140 | / if !key.modifiers.contains(KeyModifiers::CONTROL) [INFO] [stdout] 1141 | | && !key.modifiers.contains(KeyModifiers::ALT) [INFO] [stdout] 1142 | | { [INFO] [stdout] 1143 | | scan_field_mut(app).push(c); [INFO] [stdout] 1144 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1139 ~ KeyCode::Char(c) [INFO] [stdout] 1140 | if !key.modifiers.contains(KeyModifiers::CONTROL) [INFO] [stdout] 1141 | && !key.modifiers.contains(KeyModifiers::ALT) [INFO] [stdout] 1142 ~ => { [INFO] [stdout] 1143 | scan_field_mut(app).push(c); [INFO] [stdout] 1144 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:1173:21 [INFO] [stdout] | [INFO] [stdout] 1173 | / if !key.modifiers.contains(KeyModifiers::CONTROL) [INFO] [stdout] 1174 | | && !key.modifiers.contains(KeyModifiers::ALT) [INFO] [stdout] 1175 | | { [INFO] [stdout] 1176 | | snapshots_thin_field_mut(app).push(c); [INFO] [stdout] 1177 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1172 ~ KeyCode::Char(c) [INFO] [stdout] 1173 | if !key.modifiers.contains(KeyModifiers::CONTROL) [INFO] [stdout] 1174 | && !key.modifiers.contains(KeyModifiers::ALT) [INFO] [stdout] 1175 ~ => { [INFO] [stdout] 1176 | snapshots_thin_field_mut(app).push(c); [INFO] [stdout] 1177 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `r.repair_actions.get(0)` [INFO] [stdout] --> src/tui/mod.rs:1615:35 [INFO] [stdout] | [INFO] [stdout] 1615 | .and_then(|r| r.repair_actions.get(0).cloned()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r.repair_actions.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/logs/mod.rs:213:1 [INFO] [stdout] | [INFO] [stdout] 213 | / pub fn write_snapshots_thin_log( [INFO] [stdout] 214 | | home_dir: &Path, [INFO] [stdout] 215 | | started_at: OffsetDateTime, [INFO] [stdout] 216 | | finished_at: OffsetDateTime, [INFO] [stdout] ... | [INFO] [stdout] 222 | | error: Option, [INFO] [stdout] 223 | | ) -> Result { [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (13/7) [INFO] [stdout] --> src/logs/mod.rs:263:1 [INFO] [stdout] | [INFO] [stdout] 263 | / pub fn write_snapshots_delete_log( [INFO] [stdout] 264 | | home_dir: &Path, [INFO] [stdout] 265 | | started_at: OffsetDateTime, [INFO] [stdout] 266 | | finished_at: OffsetDateTime, [INFO] [stdout] ... | [INFO] [stdout] 276 | | delete_error: Option, [INFO] [stdout] 277 | | ) -> Result { [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/logs/mod.rs:293:50 [INFO] [stdout] | [INFO] [stdout] 293 | let status = if list_attempt.error.is_some() { [INFO] [stdout] | __________________________________________________^ [INFO] [stdout] 294 | | "error" [INFO] [stdout] 295 | | } else if list_attempt.exit_code != Some(0) { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/logs/mod.rs:295:49 [INFO] [stdout] | [INFO] [stdout] 295 | } else if list_attempt.exit_code != Some(0) { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 296 | | "error" [INFO] [stdout] 297 | | } else if let Some(delete_attempt) = &delete_attempt { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/logs/mod.rs:298:43 [INFO] [stdout] | [INFO] [stdout] 298 | if delete_attempt.error.is_some() { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 299 | | "error" [INFO] [stdout] 300 | | } else if delete_attempt.exit_code != Some(0) { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/logs/mod.rs:300:55 [INFO] [stdout] | [INFO] [stdout] 300 | } else if delete_attempt.exit_code != Some(0) { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 301 | | "error" [INFO] [stdout] 302 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: try not to call a closure in the expression where it is declared [INFO] [stdout] --> src/tui/mod.rs:2623:19 [INFO] [stdout] | [INFO] [stdout] 2623 | let res = (|| -> Result { [INFO] [stdout] | ___________________^ [INFO] [stdout] 2624 | | let mut results = Vec::::new(); [INFO] [stdout] 2625 | | [INFO] [stdout] 2626 | | for action in actions { [INFO] [stdout] ... | [INFO] [stdout] 2681 | | Ok(FixRunCmdResult { results, return_to }) [INFO] [stdout] 2682 | | })(); [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] = note: `#[warn(clippy::redundant_closure_call)]` on by default [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 2623 ~ let res = { [INFO] [stdout] 2624 + let mut results = Vec::::new(); [INFO] [stdout] 2625 + [INFO] [stdout] 2626 + for action in actions { [INFO] [stdout] 2627 + let started_at = OffsetDateTime::now_utc(); [INFO] [stdout] 2628 + let attempt = crate::actions::run_allowlisted_cmd(&action, timeout); [INFO] [stdout] 2629 + let (output, attempt_error) = match attempt { [INFO] [stdout] 2630 + Ok(output) => (Some(output), None), [INFO] [stdout] 2631 + Err(err) => (None, Some(err.to_string())), [INFO] [stdout] 2632 + }; [INFO] [stdout] 2633 + let finished_at = OffsetDateTime::now_utc(); [INFO] [stdout] 2634 + [INFO] [stdout] 2635 + let log_path = crate::logs::write_fix_run_cmd_log( [INFO] [stdout] 2636 + &home_dir, [INFO] [stdout] 2637 + started_at, [INFO] [stdout] 2638 + finished_at, [INFO] [stdout] 2639 + &action, [INFO] [stdout] 2640 + output.as_ref(), [INFO] [stdout] 2641 + attempt_error.clone(), [INFO] [stdout] 2642 + ); [INFO] [stdout] 2643 + [INFO] [stdout] 2644 + let (log_path, log_error) = match log_path { [INFO] [stdout] 2645 + Ok(path) => (Some(path), None), [INFO] [stdout] 2646 + Err(err) => (None, Some(err.to_string())), [INFO] [stdout] 2647 + }; [INFO] [stdout] 2648 + [INFO] [stdout] 2649 + let exit_code = output.as_ref().map(|o| o.exit_code); [INFO] [stdout] 2650 + let mut warning = None::; [INFO] [stdout] 2651 + let error = if let Some(err) = attempt_error { [INFO] [stdout] 2652 + Some(err) [INFO] [stdout] 2653 + } else if let Some(out) = output.as_ref() { [INFO] [stdout] 2654 + match crate::actions::evaluate_allowlisted_run_cmd_output(&action, out) { [INFO] [stdout] 2655 + crate::actions::AllowlistedRunCmdOutcome::Ok => None, [INFO] [stdout] 2656 + crate::actions::AllowlistedRunCmdOutcome::OkWithWarnings(w) => { [INFO] [stdout] 2657 + warning = Some(w); [INFO] [stdout] 2658 + None [INFO] [stdout] 2659 + } [INFO] [stdout] 2660 + crate::actions::AllowlistedRunCmdOutcome::Error(e) => Some(e), [INFO] [stdout] 2661 + } [INFO] [stdout] 2662 + } else { [INFO] [stdout] 2663 ~ Some("コマンド出力がありません。".to_string()) [INFO] [stdout] 2664 + }; [INFO] [stdout] 2665 + let repair_actions = output [INFO] [stdout] 2666 + .as_ref() [INFO] [stdout] 2667 + .map(|out| crate::actions::suggest_allowlisted_run_cmd_repair_actions(&action, out)) [INFO] [stdout] 2668 + .unwrap_or_default(); [INFO] [stdout] 2669 + [INFO] [stdout] 2670 + results.push(FixRunCmdActionResult { [INFO] [stdout] 2671 + action, [INFO] [stdout] 2672 + exit_code, [INFO] [stdout] 2673 + warning, [INFO] [stdout] 2674 + error, [INFO] [stdout] 2675 + repair_actions, [INFO] [stdout] 2676 + log_path, [INFO] [stdout] 2677 + log_error, [INFO] [stdout] 2678 + }); [INFO] [stdout] 2679 + } [INFO] [stdout] 2680 + [INFO] [stdout] 2681 + Ok(FixRunCmdResult { results, return_to }) [INFO] [stdout] 2682 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tui/mod.rs:2707:17 [INFO] [stdout] | [INFO] [stdout] 2707 | return Err(anyhow::anyhow!("snapshots delete は macOS のみ対応です。")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2707 - return Err(anyhow::anyhow!("snapshots delete は macOS のみ対応です。")); [INFO] [stdout] 2707 + Err(anyhow::anyhow!("snapshots delete は macOS のみ対応です。")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tui/mod.rs:2857:17 [INFO] [stdout] | [INFO] [stdout] 2857 | / return Ok(SnapshotsThinResult { [INFO] [stdout] 2858 | | bytes, [INFO] [stdout] 2859 | | urgency, [INFO] [stdout] 2860 | | cmd, [INFO] [stdout] ... | [INFO] [stdout] 2865 | | return_to, [INFO] [stdout] 2866 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2857 ~ Ok(SnapshotsThinResult { [INFO] [stdout] 2858 + bytes, [INFO] [stdout] 2859 + urgency, [INFO] [stdout] 2860 + cmd, [INFO] [stdout] 2861 + exit_code: None, [INFO] [stdout] 2862 ~ error: Some("snapshots thin は macOS のみ対応です。".to_string()), [INFO] [stdout] 2863 + log_path: None, [INFO] [stdout] 2864 + log_error: None, [INFO] [stdout] 2865 + return_to, [INFO] [stdout] 2866 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tui/mod.rs:3067:17 [INFO] [stdout] | [INFO] [stdout] 3067 | / return Ok(SnapshotsDeleteResult { [INFO] [stdout] 3068 | | requested_id: uuid.clone(), [INFO] [stdout] 3069 | | resolved_uuid: Some(uuid), [INFO] [stdout] 3070 | | delete_cmd: delete_cmd_str, [INFO] [stdout] ... | [INFO] [stdout] 3076 | | return_to, [INFO] [stdout] 3077 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 3067 ~ Ok(SnapshotsDeleteResult { [INFO] [stdout] 3068 + requested_id: uuid.clone(), [INFO] [stdout] 3069 + resolved_uuid: Some(uuid), [INFO] [stdout] 3070 + delete_cmd: delete_cmd_str, [INFO] [stdout] 3071 + list_exit_code: None, [INFO] [stdout] 3072 + delete_exit_code: None, [INFO] [stdout] 3073 ~ error: Some("snapshots delete は macOS のみ対応です。".to_string()), [INFO] [stdout] 3074 + log_path: None, [INFO] [stdout] 3075 + log_error: None, [INFO] [stdout] 3076 + return_to, [INFO] [stdout] 3077 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/tui/mod.rs:3786:5 [INFO] [stdout] | [INFO] [stdout] 3786 | / let mut detail_lines = Vec::::new(); [INFO] [stdout] 3787 | | detail_lines.push(Line::from(Span::styled( [INFO] [stdout] 3788 | | "snapshots thin(R3)", [INFO] [stdout] 3789 | | Style::default().add_modifier(Modifier::BOLD), [INFO] [stdout] ... | [INFO] [stdout] 3819 | | "- stdout/stderr の詳細はログ画面(~/.config/macdiet/logs/)で確認できます。", [INFO] [stdout] 3820 | | )); [INFO] [stdout] | |_______^ help: consider using the `vec![]` macro: `let detail_lines = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/platform/mod.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | / return OsInfo { [INFO] [stdout] 198 | | name: "unknown".to_string(), [INFO] [stdout] 199 | | version: "unknown".to_string(), [INFO] [stdout] 200 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 197 ~ OsInfo { [INFO] [stdout] 198 + name: "unknown".to_string(), [INFO] [stdout] 199 + version: "unknown".to_string(), [INFO] [stdout] 200 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/rules/mod.rs:1240:1 [INFO] [stdout] | [INFO] [stdout] 1240 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1275 | / fn dir_finding( [INFO] [stdout] 1276 | | ctx: &RuleContext, [INFO] [stdout] 1277 | | finding_id: &str, [INFO] [stdout] 1278 | | finding_type: &str, [INFO] [stdout] ... | [INFO] [stdout] 1282 | | action: Option, [INFO] [stdout] 1283 | | ) -> Option { [INFO] [stdout] | |_______________________^ [INFO] [stdout] ... [INFO] [stdout] 1328 | / fn show_instructions_action( [INFO] [stdout] 1329 | | id: &str, [INFO] [stdout] 1330 | | title: &str, [INFO] [stdout] 1331 | | risk_level: RiskLevel, [INFO] [stdout] 1332 | | related_findings: Vec, [INFO] [stdout] 1333 | | markdown: &str, [INFO] [stdout] 1334 | | ) -> ActionPlan { [INFO] [stdout] | |_______________^ [INFO] [stdout] ... [INFO] [stdout] 1348 | fn maybe_mask_home(path: &Path, home_dir: &Path, mask_home: bool) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` on by default [INFO] [stdout] = help: move the items to before the test module was defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/tui/mod.rs:3914:5 [INFO] [stdout] | [INFO] [stdout] 3914 | / let mut lines = Vec::::new(); [INFO] [stdout] 3915 | | lines.push(Line::from(vec![ [INFO] [stdout] 3916 | | Span::styled( [INFO] [stdout] 3917 | | "snapshots thin が完了しました", [INFO] [stdout] ... | [INFO] [stdout] 3945 | | Span::raw(log_hint), [INFO] [stdout] 3946 | | ])); [INFO] [stdout] | |________^ help: consider using the `vec![]` macro: `let mut lines = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/rules/mod.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | / let mut out = Vec::new(); [INFO] [stdout] 53 | | out.push(tm_local_snapshots_status(ctx)); [INFO] [stdout] 54 | | out.push(apfs_snapshots_status(ctx)); [INFO] [stdout] | |_________________________________________^ help: consider using the `vec![]` macro: `let out = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/tui/mod.rs:4056:5 [INFO] [stdout] | [INFO] [stdout] 4056 | / let mut detail_lines = Vec::::new(); [INFO] [stdout] 4057 | | detail_lines.push(Line::from(Span::styled( [INFO] [stdout] 4058 | | "snapshots delete(R3)", [INFO] [stdout] 4059 | | Style::default().add_modifier(Modifier::BOLD), [INFO] [stdout] ... | [INFO] [stdout] 4076 | | )); [INFO] [stdout] 4077 | | detail_lines.push(Line::from("")); [INFO] [stdout] | |______________________________________^ help: consider using the `vec![]` macro: `let mut detail_lines = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/tui/mod.rs:4137:5 [INFO] [stdout] | [INFO] [stdout] 4137 | / let mut lines = Vec::::new(); [INFO] [stdout] 4138 | | lines.push(Line::from(vec![ [INFO] [stdout] 4139 | | Span::styled( [INFO] [stdout] 4140 | | "snapshots delete(R3)", [INFO] [stdout] ... | [INFO] [stdout] 4156 | | Style::default().fg(Color::DarkGray), [INFO] [stdout] 4157 | | ))); [INFO] [stdout] | |________^ help: consider using the `vec![]` macro: `let mut lines = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rules/mod.rs:814:9 [INFO] [stdout] | [INFO] [stdout] 814 | / return RuleOutput { [INFO] [stdout] 815 | | finding, [INFO] [stdout] 816 | | actions: vec![], [INFO] [stdout] 817 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 814 ~ RuleOutput { [INFO] [stdout] 815 + finding, [INFO] [stdout] 816 + actions: vec![], [INFO] [stdout] 817 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rules/mod.rs:977:9 [INFO] [stdout] | [INFO] [stdout] 977 | / return RuleOutput { [INFO] [stdout] 978 | | finding, [INFO] [stdout] 979 | | actions: vec![], [INFO] [stdout] 980 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 977 ~ RuleOutput { [INFO] [stdout] 978 + finding, [INFO] [stdout] 979 + actions: vec![], [INFO] [stdout] 980 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/scan/mod.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | / if let Some(d) = deadline { [INFO] [stdout] 51 | | if d < end { [INFO] [stdout] 52 | | end = d; [INFO] [stdout] 53 | | } [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 50 ~ if let Some(d) = deadline [INFO] [stdout] 51 ~ && d < end { [INFO] [stdout] 52 | end = d; [INFO] [stdout] 53 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/snapshots/mod.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | / if lower.contains("uuid") { [INFO] [stdout] 104 | | if let Some(uuid) = first_uuid_in_line(trimmed) { [INFO] [stdout] 105 | | cur.uuids.insert(uuid.to_ascii_lowercase()); [INFO] [stdout] 106 | | } [INFO] [stdout] 107 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 103 ~ if lower.contains("uuid") [INFO] [stdout] 104 ~ && let Some(uuid) = first_uuid_in_line(trimmed) { [INFO] [stdout] 105 | cur.uuids.insert(uuid.to_ascii_lowercase()); [INFO] [stdout] 106 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get("com.apple.TimeMachine.2026-01-01-000000.local") [INFO] [stdout] .is_some()` [INFO] [stdout] --> src/snapshots/mod.rs:154:18 [INFO] [stdout] | [INFO] [stdout] 154 | .get("com.apple.TimeMachine.2026-01-01-000000.local") [INFO] [stdout] | __________________^ [INFO] [stdout] 155 | | .is_some() [INFO] [stdout] | |__________________________^ help: replace it with: `contains_key("com.apple.TimeMachine.2026-01-01-000000.local")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tui/mod.rs:5485:1 [INFO] [stdout] | [INFO] [stdout] 5485 | / fn draw_findings( [INFO] [stdout] 5486 | | f: &mut ratatui::Frame, [INFO] [stdout] 5487 | | left: Rect, [INFO] [stdout] 5488 | | right: Rect, [INFO] [stdout] ... | [INFO] [stdout] 5493 | | show_evidence: bool, [INFO] [stdout] 5494 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:947:21 [INFO] [stdout] | [INFO] [stdout] 947 | / if key.kind == KeyEventKind::Press { [INFO] [stdout] 948 | | if handle_key(&mut app, &engine, key)? { [INFO] [stdout] 949 | | break; [INFO] [stdout] 950 | | } [INFO] [stdout] 951 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 946 ~ Event::Key(key) [INFO] [stdout] 947 ~ if key.kind == KeyEventKind::Press => { [INFO] [stdout] 948 | if handle_key(&mut app, &engine, key)? { [INFO] [stdout] 949 | break; [INFO] [stdout] 950 | } [INFO] [stdout] 951 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tui/mod.rs:947:21 [INFO] [stdout] | [INFO] [stdout] 947 | / if key.kind == KeyEventKind::Press { [INFO] [stdout] 948 | | if handle_key(&mut app, &engine, key)? { [INFO] [stdout] 949 | | break; [INFO] [stdout] 950 | | } [INFO] [stdout] 951 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 947 ~ if key.kind == KeyEventKind::Press [INFO] [stdout] 948 ~ && handle_key(&mut app, &engine, key)? { [INFO] [stdout] 949 | break; [INFO] [stdout] 950 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:1059:17 [INFO] [stdout] | [INFO] [stdout] 1059 | / if !key.modifiers.contains(KeyModifiers::CONTROL) [INFO] [stdout] 1060 | | && !key.modifiers.contains(KeyModifiers::ALT) [INFO] [stdout] 1061 | | { [INFO] [stdout] 1062 | | app.filter.push(c); [INFO] [stdout] ... | [INFO] [stdout] 1072 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1058 ~ KeyCode::Char(c) [INFO] [stdout] 1059 | if !key.modifiers.contains(KeyModifiers::CONTROL) [INFO] [stdout] 1060 | && !key.modifiers.contains(KeyModifiers::ALT) [INFO] [stdout] 1061 ~ => { [INFO] [stdout] 1062 | app.filter.push(c); [INFO] [stdout] ... [INFO] [stdout] 1071 | } [INFO] [stdout] 1072 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/tui/mod.rs:5707:5 [INFO] [stdout] | [INFO] [stdout] 5707 | / let mut lines = Vec::::new(); [INFO] [stdout] 5708 | | lines.push(Line::from(vec![ [INFO] [stdout] 5709 | | Span::styled("id: ", Style::default().fg(Color::DarkGray)), [INFO] [stdout] 5710 | | Span::raw(action.id.clone()), [INFO] [stdout] ... | [INFO] [stdout] 5724 | | Style::default().add_modifier(Modifier::BOLD), [INFO] [stdout] 5725 | | ))); [INFO] [stdout] | |________^ help: consider using the `vec![]` macro: `let mut lines = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:1096:17 [INFO] [stdout] | [INFO] [stdout] 1096 | / if app.query_mode { [INFO] [stdout] 1097 | | app.query_mode = false; [INFO] [stdout] 1098 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1095 ~ KeyCode::Esc [INFO] [stdout] 1096 ~ if app.query_mode => { [INFO] [stdout] 1097 | app.query_mode = false; [INFO] [stdout] 1098 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:1117:17 [INFO] [stdout] | [INFO] [stdout] 1117 | / if app.query_mode { [INFO] [stdout] 1118 | | app.query.pop(); [INFO] [stdout] 1119 | | app.ensure_command_selection_in_range(); [INFO] [stdout] 1120 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1116 ~ KeyCode::Backspace [INFO] [stdout] 1117 ~ if app.query_mode => { [INFO] [stdout] 1118 | app.query.pop(); [INFO] [stdout] 1119 | app.ensure_command_selection_in_range(); [INFO] [stdout] 1120 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:1123:17 [INFO] [stdout] | [INFO] [stdout] 1123 | / if app.query_mode { [INFO] [stdout] 1124 | | app.query.push(c); [INFO] [stdout] 1125 | | app.ensure_command_selection_in_range(); [INFO] [stdout] 1126 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1122 ~ KeyCode::Char(c) [INFO] [stdout] 1123 ~ if app.query_mode => { [INFO] [stdout] 1124 | app.query.push(c); [INFO] [stdout] 1125 | app.ensure_command_selection_in_range(); [INFO] [stdout] 1126 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:1140:21 [INFO] [stdout] | [INFO] [stdout] 1140 | / if !key.modifiers.contains(KeyModifiers::CONTROL) [INFO] [stdout] 1141 | | && !key.modifiers.contains(KeyModifiers::ALT) [INFO] [stdout] 1142 | | { [INFO] [stdout] 1143 | | scan_field_mut(app).push(c); [INFO] [stdout] 1144 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1139 ~ KeyCode::Char(c) [INFO] [stdout] 1140 | if !key.modifiers.contains(KeyModifiers::CONTROL) [INFO] [stdout] 1141 | && !key.modifiers.contains(KeyModifiers::ALT) [INFO] [stdout] 1142 ~ => { [INFO] [stdout] 1143 | scan_field_mut(app).push(c); [INFO] [stdout] 1144 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/tui/mod.rs:1173:21 [INFO] [stdout] | [INFO] [stdout] 1173 | / if !key.modifiers.contains(KeyModifiers::CONTROL) [INFO] [stdout] 1174 | | && !key.modifiers.contains(KeyModifiers::ALT) [INFO] [stdout] 1175 | | { [INFO] [stdout] 1176 | | snapshots_thin_field_mut(app).push(c); [INFO] [stdout] 1177 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1172 ~ KeyCode::Char(c) [INFO] [stdout] 1173 | if !key.modifiers.contains(KeyModifiers::CONTROL) [INFO] [stdout] 1174 | && !key.modifiers.contains(KeyModifiers::ALT) [INFO] [stdout] 1175 ~ => { [INFO] [stdout] 1176 | snapshots_thin_field_mut(app).push(c); [INFO] [stdout] 1177 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/tui/mod.rs:5857:5 [INFO] [stdout] | [INFO] [stdout] 5857 | / let mut lines = Vec::::new(); [INFO] [stdout] 5858 | | lines.push(Line::from(vec![ [INFO] [stdout] 5859 | | Span::styled("id: ", Style::default().fg(Color::DarkGray)), [INFO] [stdout] 5860 | | Span::raw(action.id.clone()), [INFO] [stdout] ... | [INFO] [stdout] 5871 | | lines.push(Line::from("")); [INFO] [stdout] | |_______________________________^ help: consider using the `vec![]` macro: `let mut lines = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/tui/mod.rs:5962:10 [INFO] [stdout] | [INFO] [stdout] 5962 | .trim() [INFO] [stdout] | __________^ [INFO] [stdout] 5963 | | .split_whitespace() [INFO] [stdout] | |_________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `r.repair_actions.get(0)` [INFO] [stdout] --> src/tui/mod.rs:1615:35 [INFO] [stdout] | [INFO] [stdout] 1615 | .and_then(|r| r.repair_actions.get(0).cloned()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r.repair_actions.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tui/mod.rs:6960:5 [INFO] [stdout] | [INFO] [stdout] 6960 | / if let Ok((content, _truncated)) = read_file_limited(path, 48 * 1024) { [INFO] [stdout] 6961 | | if let Ok(v) = serde_json::from_str::(&content) { [INFO] [stdout] 6962 | | for key in [ [INFO] [stdout] 6963 | | "command", [INFO] [stdout] ... | [INFO] [stdout] 6986 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6960 ~ if let Ok((content, _truncated)) = read_file_limited(path, 48 * 1024) [INFO] [stdout] 6961 ~ && let Ok(v) = serde_json::from_str::(&content) { [INFO] [stdout] 6962 | for key in [ [INFO] [stdout] ... [INFO] [stdout] 6984 | } [INFO] [stdout] 6985 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: try not to call a closure in the expression where it is declared [INFO] [stdout] --> src/tui/mod.rs:2623:19 [INFO] [stdout] | [INFO] [stdout] 2623 | let res = (|| -> Result { [INFO] [stdout] | ___________________^ [INFO] [stdout] 2624 | | let mut results = Vec::::new(); [INFO] [stdout] 2625 | | [INFO] [stdout] 2626 | | for action in actions { [INFO] [stdout] ... | [INFO] [stdout] 2681 | | Ok(FixRunCmdResult { results, return_to }) [INFO] [stdout] 2682 | | })(); [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] = note: `#[warn(clippy::redundant_closure_call)]` on by default [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 2623 ~ let res = { [INFO] [stdout] 2624 + let mut results = Vec::::new(); [INFO] [stdout] 2625 + [INFO] [stdout] 2626 + for action in actions { [INFO] [stdout] 2627 + let started_at = OffsetDateTime::now_utc(); [INFO] [stdout] 2628 + let attempt = crate::actions::run_allowlisted_cmd(&action, timeout); [INFO] [stdout] 2629 + let (output, attempt_error) = match attempt { [INFO] [stdout] 2630 + Ok(output) => (Some(output), None), [INFO] [stdout] 2631 + Err(err) => (None, Some(err.to_string())), [INFO] [stdout] 2632 + }; [INFO] [stdout] 2633 + let finished_at = OffsetDateTime::now_utc(); [INFO] [stdout] 2634 + [INFO] [stdout] 2635 + let log_path = crate::logs::write_fix_run_cmd_log( [INFO] [stdout] 2636 + &home_dir, [INFO] [stdout] 2637 + started_at, [INFO] [stdout] 2638 + finished_at, [INFO] [stdout] 2639 + &action, [INFO] [stdout] 2640 + output.as_ref(), [INFO] [stdout] 2641 + attempt_error.clone(), [INFO] [stdout] 2642 + ); [INFO] [stdout] 2643 + [INFO] [stdout] 2644 + let (log_path, log_error) = match log_path { [INFO] [stdout] 2645 + Ok(path) => (Some(path), None), [INFO] [stdout] 2646 + Err(err) => (None, Some(err.to_string())), [INFO] [stdout] 2647 + }; [INFO] [stdout] 2648 + [INFO] [stdout] 2649 + let exit_code = output.as_ref().map(|o| o.exit_code); [INFO] [stdout] 2650 + let mut warning = None::; [INFO] [stdout] 2651 + let error = if let Some(err) = attempt_error { [INFO] [stdout] 2652 + Some(err) [INFO] [stdout] 2653 + } else if let Some(out) = output.as_ref() { [INFO] [stdout] 2654 + match crate::actions::evaluate_allowlisted_run_cmd_output(&action, out) { [INFO] [stdout] 2655 + crate::actions::AllowlistedRunCmdOutcome::Ok => None, [INFO] [stdout] 2656 + crate::actions::AllowlistedRunCmdOutcome::OkWithWarnings(w) => { [INFO] [stdout] 2657 + warning = Some(w); [INFO] [stdout] 2658 + None [INFO] [stdout] 2659 + } [INFO] [stdout] 2660 + crate::actions::AllowlistedRunCmdOutcome::Error(e) => Some(e), [INFO] [stdout] 2661 + } [INFO] [stdout] 2662 + } else { [INFO] [stdout] 2663 ~ Some("コマンド出力がありません。".to_string()) [INFO] [stdout] 2664 + }; [INFO] [stdout] 2665 + let repair_actions = output [INFO] [stdout] 2666 + .as_ref() [INFO] [stdout] 2667 + .map(|out| crate::actions::suggest_allowlisted_run_cmd_repair_actions(&action, out)) [INFO] [stdout] 2668 + .unwrap_or_default(); [INFO] [stdout] 2669 + [INFO] [stdout] 2670 + results.push(FixRunCmdActionResult { [INFO] [stdout] 2671 + action, [INFO] [stdout] 2672 + exit_code, [INFO] [stdout] 2673 + warning, [INFO] [stdout] 2674 + error, [INFO] [stdout] 2675 + repair_actions, [INFO] [stdout] 2676 + log_path, [INFO] [stdout] 2677 + log_error, [INFO] [stdout] 2678 + }); [INFO] [stdout] 2679 + } [INFO] [stdout] 2680 + [INFO] [stdout] 2681 + Ok(FixRunCmdResult { results, return_to }) [INFO] [stdout] 2682 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tui/mod.rs:2707:17 [INFO] [stdout] | [INFO] [stdout] 2707 | return Err(anyhow::anyhow!("snapshots delete は macOS のみ対応です。")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2707 - return Err(anyhow::anyhow!("snapshots delete は macOS のみ対応です。")); [INFO] [stdout] 2707 + Err(anyhow::anyhow!("snapshots delete は macOS のみ対応です。")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tui/mod.rs:2857:17 [INFO] [stdout] | [INFO] [stdout] 2857 | / return Ok(SnapshotsThinResult { [INFO] [stdout] 2858 | | bytes, [INFO] [stdout] 2859 | | urgency, [INFO] [stdout] 2860 | | cmd, [INFO] [stdout] ... | [INFO] [stdout] 2865 | | return_to, [INFO] [stdout] 2866 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2857 ~ Ok(SnapshotsThinResult { [INFO] [stdout] 2858 + bytes, [INFO] [stdout] 2859 + urgency, [INFO] [stdout] 2860 + cmd, [INFO] [stdout] 2861 + exit_code: None, [INFO] [stdout] 2862 ~ error: Some("snapshots thin は macOS のみ対応です。".to_string()), [INFO] [stdout] 2863 + log_path: None, [INFO] [stdout] 2864 + log_error: None, [INFO] [stdout] 2865 + return_to, [INFO] [stdout] 2866 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tui/mod.rs:3067:17 [INFO] [stdout] | [INFO] [stdout] 3067 | / return Ok(SnapshotsDeleteResult { [INFO] [stdout] 3068 | | requested_id: uuid.clone(), [INFO] [stdout] 3069 | | resolved_uuid: Some(uuid), [INFO] [stdout] 3070 | | delete_cmd: delete_cmd_str, [INFO] [stdout] ... | [INFO] [stdout] 3076 | | return_to, [INFO] [stdout] 3077 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 3067 ~ Ok(SnapshotsDeleteResult { [INFO] [stdout] 3068 + requested_id: uuid.clone(), [INFO] [stdout] 3069 + resolved_uuid: Some(uuid), [INFO] [stdout] 3070 + delete_cmd: delete_cmd_str, [INFO] [stdout] 3071 + list_exit_code: None, [INFO] [stdout] 3072 + delete_exit_code: None, [INFO] [stdout] 3073 ~ error: Some("snapshots delete は macOS のみ対応です。".to_string()), [INFO] [stdout] 3074 + log_path: None, [INFO] [stdout] 3075 + log_error: None, [INFO] [stdout] 3076 + return_to, [INFO] [stdout] 3077 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `cfg.max_table_rows.min(top_n).min(total_findings)` is never smaller than `0` and has therefore no effect [INFO] [stdout] --> src/ui/mod.rs:76:16 [INFO] [stdout] | [INFO] [stdout] 76 | let rows = cfg.max_table_rows.min(top_n).min(total_findings).max(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cfg.max_table_rows.min(top_n).min(total_findings)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/mod.rs:151:13 [INFO] [stdout] | [INFO] [stdout] 151 | / if finding.finding_type.ends_with("_UNOBSERVED") { [INFO] [stdout] 152 | | if let Some(reason) = unobserved_reason(&finding.evidence) { [INFO] [stdout] 153 | | let _ = writeln!(out, " - 理由: {reason}"); [INFO] [stdout] 154 | | } [INFO] [stdout] 155 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 151 ~ if finding.finding_type.ends_with("_UNOBSERVED") [INFO] [stdout] 152 ~ && let Some(reason) = unobserved_reason(&finding.evidence) { [INFO] [stdout] 153 | let _ = writeln!(out, " - 理由: {reason}"); [INFO] [stdout] 154 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/tui/mod.rs:3786:5 [INFO] [stdout] | [INFO] [stdout] 3786 | / let mut detail_lines = Vec::::new(); [INFO] [stdout] 3787 | | detail_lines.push(Line::from(Span::styled( [INFO] [stdout] 3788 | | "snapshots thin(R3)", [INFO] [stdout] 3789 | | Style::default().add_modifier(Modifier::BOLD), [INFO] [stdout] ... | [INFO] [stdout] 3819 | | "- stdout/stderr の詳細はログ画面(~/.config/macdiet/logs/)で確認できます。", [INFO] [stdout] 3820 | | )); [INFO] [stdout] | |_______^ help: consider using the `vec![]` macro: `let detail_lines = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/tui/mod.rs:3914:5 [INFO] [stdout] | [INFO] [stdout] 3914 | / let mut lines = Vec::::new(); [INFO] [stdout] 3915 | | lines.push(Line::from(vec![ [INFO] [stdout] 3916 | | Span::styled( [INFO] [stdout] 3917 | | "snapshots thin が完了しました", [INFO] [stdout] ... | [INFO] [stdout] 3945 | | Span::raw(log_hint), [INFO] [stdout] 3946 | | ])); [INFO] [stdout] | |________^ help: consider using the `vec![]` macro: `let mut lines = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/mod.rs:265:17 [INFO] [stdout] | [INFO] [stdout] 265 | / if !cfg.verbose && action.risk_level >= RiskLevel::R2 { [INFO] [stdout] 266 | | if let Some(note) = first_highlight_line(markdown, first) { [INFO] [stdout] 267 | | let _ = writeln!(out, " - 注記: {note}"); [INFO] [stdout] 268 | | } [INFO] [stdout] 269 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 265 ~ if !cfg.verbose && action.risk_level >= RiskLevel::R2 [INFO] [stdout] 266 ~ && let Some(note) = first_highlight_line(markdown, first) { [INFO] [stdout] 267 | let _ = writeln!(out, " - 注記: {note}"); [INFO] [stdout] 268 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/tui/mod.rs:4056:5 [INFO] [stdout] | [INFO] [stdout] 4056 | / let mut detail_lines = Vec::::new(); [INFO] [stdout] 4057 | | detail_lines.push(Line::from(Span::styled( [INFO] [stdout] 4058 | | "snapshots delete(R3)", [INFO] [stdout] 4059 | | Style::default().add_modifier(Modifier::BOLD), [INFO] [stdout] ... | [INFO] [stdout] 4076 | | )); [INFO] [stdout] 4077 | | detail_lines.push(Line::from("")); [INFO] [stdout] | |______________________________________^ help: consider using the `vec![]` macro: `let mut detail_lines = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/mod.rs:350:17 [INFO] [stdout] | [INFO] [stdout] 350 | / if action.risk_level >= RiskLevel::R2 { [INFO] [stdout] 351 | | if let Some(note) = first_highlight_line(markdown, first) { [INFO] [stdout] 352 | | let _ = writeln!(out, " - 注記: {note}"); [INFO] [stdout] 353 | | } [INFO] [stdout] 354 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 350 ~ if action.risk_level >= RiskLevel::R2 [INFO] [stdout] 351 ~ && let Some(note) = first_highlight_line(markdown, first) { [INFO] [stdout] 352 | let _ = writeln!(out, " - 注記: {note}"); [INFO] [stdout] 353 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/tui/mod.rs:4137:5 [INFO] [stdout] | [INFO] [stdout] 4137 | / let mut lines = Vec::::new(); [INFO] [stdout] 4138 | | lines.push(Line::from(vec![ [INFO] [stdout] 4139 | | Span::styled( [INFO] [stdout] 4140 | | "snapshots delete(R3)", [INFO] [stdout] ... | [INFO] [stdout] 4156 | | Style::default().fg(Color::DarkGray), [INFO] [stdout] 4157 | | ))); [INFO] [stdout] | |________^ help: consider using the `vec![]` macro: `let mut lines = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/mod.rs:402:9 [INFO] [stdout] | [INFO] [stdout] 402 | / if finding.finding_type.ends_with("_UNOBSERVED") { [INFO] [stdout] 403 | | if let Some(reason) = unobserved_reason(&finding.evidence) { [INFO] [stdout] 404 | | let _ = writeln!(out, " - 理由: {reason}"); [INFO] [stdout] 405 | | } [INFO] [stdout] 406 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 402 ~ if finding.finding_type.ends_with("_UNOBSERVED") [INFO] [stdout] 403 ~ && let Some(reason) = unobserved_reason(&finding.evidence) { [INFO] [stdout] 404 | let _ = writeln!(out, " - 理由: {reason}"); [INFO] [stdout] 405 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/mod.rs:421:21 [INFO] [stdout] | [INFO] [stdout] 421 | / if matches!( [INFO] [stdout] 422 | | action.kind, [INFO] [stdout] 423 | | crate::core::ActionKind::ShowInstructions { .. } [INFO] [stdout] 424 | | ) && !cfg.verbose [INFO] [stdout] ... | [INFO] [stdout] 433 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 424 ~ ) && !cfg.verbose [INFO] [stdout] 425 ~ && let crate::core::ActionKind::ShowInstructions { markdown } = &action.kind [INFO] [stdout] 426 | { [INFO] [stdout] ... [INFO] [stdout] 430 | } [INFO] [stdout] 431 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/ui/mod.rs:543:21 [INFO] [stdout] | [INFO] [stdout] 543 | fn prioritize_notes<'a>(notes: &'a [String]) -> Vec<&'a String> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 543 - fn prioritize_notes<'a>(notes: &'a [String]) -> Vec<&'a String> { [INFO] [stdout] 543 + fn prioritize_notes(notes: &[String]) -> Vec<&String> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/mod.rs:701:9 [INFO] [stdout] | [INFO] [stdout] 701 | / if ch == '\x1b' { [INFO] [stdout] 702 | | if chars.peek() == Some(&'[') { [INFO] [stdout] 703 | | let _ = chars.next(); [INFO] [stdout] 704 | | while let Some(ch2) = chars.next() { [INFO] [stdout] ... | [INFO] [stdout] 711 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 701 ~ if ch == '\x1b' [INFO] [stdout] 702 ~ && chars.peek() == Some(&'[') { [INFO] [stdout] 703 | let _ = chars.next(); [INFO] [stdout] ... [INFO] [stdout] 709 | continue; [INFO] [stdout] 710 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/ui/mod.rs:704:17 [INFO] [stdout] | [INFO] [stdout] 704 | while let Some(ch2) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for ch2 in chars.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/tui/mod.rs:5485:1 [INFO] [stdout] | [INFO] [stdout] 5485 | / fn draw_findings( [INFO] [stdout] 5486 | | f: &mut ratatui::Frame, [INFO] [stdout] 5487 | | left: Rect, [INFO] [stdout] 5488 | | right: Rect, [INFO] [stdout] ... | [INFO] [stdout] 5493 | | show_evidence: bool, [INFO] [stdout] 5494 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/tui/mod.rs:5707:5 [INFO] [stdout] | [INFO] [stdout] 5707 | / let mut lines = Vec::::new(); [INFO] [stdout] 5708 | | lines.push(Line::from(vec![ [INFO] [stdout] 5709 | | Span::styled("id: ", Style::default().fg(Color::DarkGray)), [INFO] [stdout] 5710 | | Span::raw(action.id.clone()), [INFO] [stdout] ... | [INFO] [stdout] 5724 | | Style::default().add_modifier(Modifier::BOLD), [INFO] [stdout] 5725 | | ))); [INFO] [stdout] | |________^ help: consider using the `vec![]` macro: `let mut lines = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/tui/mod.rs:5857:5 [INFO] [stdout] | [INFO] [stdout] 5857 | / let mut lines = Vec::::new(); [INFO] [stdout] 5858 | | lines.push(Line::from(vec![ [INFO] [stdout] 5859 | | Span::styled("id: ", Style::default().fg(Color::DarkGray)), [INFO] [stdout] 5860 | | Span::raw(action.id.clone()), [INFO] [stdout] ... | [INFO] [stdout] 5871 | | lines.push(Line::from("")); [INFO] [stdout] | |_______________________________^ help: consider using the `vec![]` macro: `let mut lines = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/tui/mod.rs:5962:10 [INFO] [stdout] | [INFO] [stdout] 5962 | .trim() [INFO] [stdout] | __________^ [INFO] [stdout] 5963 | | .split_whitespace() [INFO] [stdout] | |_________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/tui/mod.rs:6960:5 [INFO] [stdout] | [INFO] [stdout] 6960 | / if let Ok((content, _truncated)) = read_file_limited(path, 48 * 1024) { [INFO] [stdout] 6961 | | if let Ok(v) = serde_json::from_str::(&content) { [INFO] [stdout] 6962 | | for key in [ [INFO] [stdout] 6963 | | "command", [INFO] [stdout] ... | [INFO] [stdout] 6986 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 6960 ~ if let Ok((content, _truncated)) = read_file_limited(path, 48 * 1024) [INFO] [stdout] 6961 ~ && let Ok(v) = serde_json::from_str::(&content) { [INFO] [stdout] 6962 | for key in [ [INFO] [stdout] ... [INFO] [stdout] 6984 | } [INFO] [stdout] 6985 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `cfg.max_table_rows.min(top_n).min(total_findings)` is never smaller than `0` and has therefore no effect [INFO] [stdout] --> src/ui/mod.rs:76:16 [INFO] [stdout] | [INFO] [stdout] 76 | let rows = cfg.max_table_rows.min(top_n).min(total_findings).max(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cfg.max_table_rows.min(top_n).min(total_findings)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/mod.rs:151:13 [INFO] [stdout] | [INFO] [stdout] 151 | / if finding.finding_type.ends_with("_UNOBSERVED") { [INFO] [stdout] 152 | | if let Some(reason) = unobserved_reason(&finding.evidence) { [INFO] [stdout] 153 | | let _ = writeln!(out, " - 理由: {reason}"); [INFO] [stdout] 154 | | } [INFO] [stdout] 155 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 151 ~ if finding.finding_type.ends_with("_UNOBSERVED") [INFO] [stdout] 152 ~ && let Some(reason) = unobserved_reason(&finding.evidence) { [INFO] [stdout] 153 | let _ = writeln!(out, " - 理由: {reason}"); [INFO] [stdout] 154 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/mod.rs:265:17 [INFO] [stdout] | [INFO] [stdout] 265 | / if !cfg.verbose && action.risk_level >= RiskLevel::R2 { [INFO] [stdout] 266 | | if let Some(note) = first_highlight_line(markdown, first) { [INFO] [stdout] 267 | | let _ = writeln!(out, " - 注記: {note}"); [INFO] [stdout] 268 | | } [INFO] [stdout] 269 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 265 ~ if !cfg.verbose && action.risk_level >= RiskLevel::R2 [INFO] [stdout] 266 ~ && let Some(note) = first_highlight_line(markdown, first) { [INFO] [stdout] 267 | let _ = writeln!(out, " - 注記: {note}"); [INFO] [stdout] 268 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/mod.rs:350:17 [INFO] [stdout] | [INFO] [stdout] 350 | / if action.risk_level >= RiskLevel::R2 { [INFO] [stdout] 351 | | if let Some(note) = first_highlight_line(markdown, first) { [INFO] [stdout] 352 | | let _ = writeln!(out, " - 注記: {note}"); [INFO] [stdout] 353 | | } [INFO] [stdout] 354 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 350 ~ if action.risk_level >= RiskLevel::R2 [INFO] [stdout] 351 ~ && let Some(note) = first_highlight_line(markdown, first) { [INFO] [stdout] 352 | let _ = writeln!(out, " - 注記: {note}"); [INFO] [stdout] 353 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/mod.rs:402:9 [INFO] [stdout] | [INFO] [stdout] 402 | / if finding.finding_type.ends_with("_UNOBSERVED") { [INFO] [stdout] 403 | | if let Some(reason) = unobserved_reason(&finding.evidence) { [INFO] [stdout] 404 | | let _ = writeln!(out, " - 理由: {reason}"); [INFO] [stdout] 405 | | } [INFO] [stdout] 406 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 402 ~ if finding.finding_type.ends_with("_UNOBSERVED") [INFO] [stdout] 403 ~ && let Some(reason) = unobserved_reason(&finding.evidence) { [INFO] [stdout] 404 | let _ = writeln!(out, " - 理由: {reason}"); [INFO] [stdout] 405 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/mod.rs:421:21 [INFO] [stdout] | [INFO] [stdout] 421 | / if matches!( [INFO] [stdout] 422 | | action.kind, [INFO] [stdout] 423 | | crate::core::ActionKind::ShowInstructions { .. } [INFO] [stdout] 424 | | ) && !cfg.verbose [INFO] [stdout] ... | [INFO] [stdout] 433 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 424 ~ ) && !cfg.verbose [INFO] [stdout] 425 ~ && let crate::core::ActionKind::ShowInstructions { markdown } = &action.kind [INFO] [stdout] 426 | { [INFO] [stdout] ... [INFO] [stdout] 430 | } [INFO] [stdout] 431 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/ui/mod.rs:543:21 [INFO] [stdout] | [INFO] [stdout] 543 | fn prioritize_notes<'a>(notes: &'a [String]) -> Vec<&'a String> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 543 - fn prioritize_notes<'a>(notes: &'a [String]) -> Vec<&'a String> { [INFO] [stdout] 543 + fn prioritize_notes(notes: &[String]) -> Vec<&String> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/mod.rs:701:9 [INFO] [stdout] | [INFO] [stdout] 701 | / if ch == '\x1b' { [INFO] [stdout] 702 | | if chars.peek() == Some(&'[') { [INFO] [stdout] 703 | | let _ = chars.next(); [INFO] [stdout] 704 | | while let Some(ch2) = chars.next() { [INFO] [stdout] ... | [INFO] [stdout] 711 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 701 ~ if ch == '\x1b' [INFO] [stdout] 702 ~ && chars.peek() == Some(&'[') { [INFO] [stdout] 703 | let _ = chars.next(); [INFO] [stdout] ... [INFO] [stdout] 709 | continue; [INFO] [stdout] 710 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/ui/mod.rs:704:17 [INFO] [stdout] | [INFO] [stdout] 704 | while let Some(ch2) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for ch2 in chars.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `macdiet_cmd` is never used [INFO] [stdout] --> tests/doctor_timeout_budget.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn macdiet_cmd(home: &Path) -> Command { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `make_temp_home` is never used [INFO] [stdout] --> tests/doctor_timeout_budget.rs:19:4 [INFO] [stdout] | [INFO] [stdout] 19 | fn make_temp_home() -> PathBuf { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `write_file` is never used [INFO] [stdout] --> tests/doctor_timeout_budget.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn write_file(path: &Path, bytes: &[u8]) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `write_file` is never used [INFO] [stdout] --> tests/snapshots_unobserved.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn write_file(path: &Path, bytes: &[u8]) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 30.47s [INFO] running `Command { std: "docker" "inspect" "e213f0c2d887163ba539ca32028b5f01f0ecae1ef45f345e1a2a83bbe3962dc0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e213f0c2d887163ba539ca32028b5f01f0ecae1ef45f345e1a2a83bbe3962dc0", kill_on_drop: false }` [INFO] [stdout] e213f0c2d887163ba539ca32028b5f01f0ecae1ef45f345e1a2a83bbe3962dc0