[INFO] fetching crate dotup 0.1.17... [INFO] linting dotup-0.1.17 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate dotup 0.1.17 into /workspace/builds/worker-6-tc1/source [INFO] started tweaking crates.io crate dotup 0.1.17 [INFO] finished tweaking crates.io crate dotup 0.1.17 [INFO] tweaked toml for crates.io crate dotup 0.1.17 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate dotup 0.1.17 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate dotup 0.1.17 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 thiserror-impl v1.0.52 [INFO] [stderr] Downloaded toml v0.8.8 [INFO] [stderr] Downloaded is-terminal v0.4.10 [INFO] [stderr] Downloaded thiserror v1.0.52 [INFO] [stderr] Downloaded clap v4.4.12 [INFO] [stderr] Downloaded winnow v0.5.31 [INFO] [stderr] Downloaded crossbeam-channel v0.5.10 [INFO] [stderr] Downloaded clap_builder v4.4.12 [INFO] [stderr] Downloaded syn v2.0.43 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] fd735caed3dacd61ca7f5dd9b5d97f74ea3842c91f42cdb0d579d1ce3b6607a4 [INFO] running `Command { std: "docker" "start" "-a" "fd735caed3dacd61ca7f5dd9b5d97f74ea3842c91f42cdb0d579d1ce3b6607a4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "fd735caed3dacd61ca7f5dd9b5d97f74ea3842c91f42cdb0d579d1ce3b6607a4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fd735caed3dacd61ca7f5dd9b5d97f74ea3842c91f42cdb0d579d1ce3b6607a4", kill_on_drop: false }` [INFO] [stdout] fd735caed3dacd61ca7f5dd9b5d97f74ea3842c91f42cdb0d579d1ce3b6607a4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f073fd6956c4727526eaa1fbe7e892c0958bace915ecc975c03f7e8a7eea8190 [INFO] running `Command { std: "docker" "start" "-a" "f073fd6956c4727526eaa1fbe7e892c0958bace915ecc975c03f7e8a7eea8190", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.71 [INFO] [stderr] Compiling libc v0.2.151 [INFO] [stderr] Compiling crossbeam-utils v0.8.18 [INFO] [stderr] Checking regex-syntax v0.8.2 [INFO] [stderr] Checking clap_lex v0.6.0 [INFO] [stderr] Checking winnow v0.5.31 [INFO] [stderr] Checking anstream v0.6.5 [INFO] [stderr] Checking walkdir v2.4.0 [INFO] [stderr] Checking is-terminal v0.4.10 [INFO] [stderr] Checking arrayvec v0.7.4 [INFO] [stderr] Checking clap_builder v4.4.12 [INFO] [stderr] Checking crossbeam-channel v0.5.10 [INFO] [stderr] Checking inotify-sys v0.1.5 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking filetime v0.2.23 [INFO] [stderr] Checking mio v0.8.10 [INFO] [stderr] Checking gethostname v0.4.3 [INFO] [stderr] Checking dirs v5.0.1 [INFO] [stderr] Checking inotify v0.9.6 [INFO] [stderr] Compiling cc v1.0.83 [INFO] [stderr] Checking regex-automata v0.4.3 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Compiling syn v2.0.43 [INFO] [stderr] Compiling blake3 v1.5.0 [INFO] [stderr] Checking regex v1.10.2 [INFO] [stderr] Checking env_logger v0.10.1 [INFO] [stderr] Compiling serde_derive v1.0.193 [INFO] [stderr] Compiling clap_derive v4.4.7 [INFO] [stderr] Checking clap v4.4.12 [INFO] [stderr] Checking serde v1.0.193 [INFO] [stderr] Checking toml_datetime v0.6.5 [INFO] [stderr] Checking serde_spanned v0.6.5 [INFO] [stderr] Checking notify v6.1.1 [INFO] [stderr] Checking toml_edit v0.21.0 [INFO] [stderr] Checking toml v0.8.8 [INFO] [stderr] Checking dotup v0.1.17 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | use clap; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | use gethostname; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | use clap; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | use gethostname; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Config2` is never constructed [INFO] [stdout] --> src/filedata/filedata.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | pub struct Config2 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/sync/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod sync; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/sync/sync.rs:26:42 [INFO] [stdout] | [INFO] [stdout] 26 | let abs_repo_path = fs::canonicalize(&repo_path).expect("Error getting absolute path."); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `repo_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/sync/sync.rs:56:42 [INFO] [stdout] | [INFO] [stdout] 56 | let abs_repo_path = fs::canonicalize(&repo_path).expect("Error getting absolute path."); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `repo_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sync/sync.rs:71:64 [INFO] [stdout] | [INFO] [stdout] 71 | let file_repo_abs_path = repo_to_abs_repo(&local_path, &repo_path); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `repo_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sync/sync.rs:155:8 [INFO] [stdout] | [INFO] [stdout] 155 | if !!!system_path.exists() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 155 - if !!!system_path.exists() { [INFO] [stdout] 155 + if !system_path.exists() { [INFO] [stdout] | [INFO] [stdout] 155 - if !!!system_path.exists() { [INFO] [stdout] 155 + if !system_path.exists() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sync/sync.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | if !!!system_path.exists() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `system_path.exists()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sync/sync.rs:164:8 [INFO] [stdout] | [INFO] [stdout] 164 | if !!!repo_path.exists() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 164 - if !!!repo_path.exists() { [INFO] [stdout] 164 + if !repo_path.exists() { [INFO] [stdout] | [INFO] [stdout] 164 - if !!!repo_path.exists() { [INFO] [stdout] 164 + if !repo_path.exists() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sync/sync.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | if !!!repo_path.exists() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `repo_path.exists()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/filedata/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod filedata; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/filedata/filedata.rs:28:20 [INFO] [stdout] | [INFO] [stdout] 28 | repo_path.push("default".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `"default"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/filedata/filedata.rs:48:24 [INFO] [stdout] | [INFO] [stdout] 48 | let path_buf = PathBuf::from(local_home_dir).join(path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `local_home_dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/filedata/filedata.rs:58:8 [INFO] [stdout] | [INFO] [stdout] 58 | if !!!get_config_path().exists() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 58 - if !!!get_config_path().exists() { [INFO] [stdout] 58 + if !get_config_path().exists() { [INFO] [stdout] | [INFO] [stdout] 58 - if !!!get_config_path().exists() { [INFO] [stdout] 58 + if !get_config_path().exists() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/filedata/filedata.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | if !!!get_config_path().exists() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `get_config_path().exists()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/filedata/filedata.rs:67:8 [INFO] [stdout] | [INFO] [stdout] 67 | if !!!toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 67 - if !!!toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] 67 + if !toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] | [INFO] [stdout] 67 - if !!!toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] 67 + if !toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/filedata/filedata.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | if !!!toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `toml_output_data.files.contains_key(&get_hostname())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/filedata/filedata.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | / if !!!toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] 68 | | toml_output_data.files.insert(get_hostname(), HashMap::new()); [INFO] [stdout] 69 | | write_config(toml_output_data); [INFO] [stdout] 70 | | get_config() [INFO] [stdout] ... | [INFO] [stdout] 73 | | toml_output_data [INFO] [stdout] 74 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 67 ~ if let std::collections::hash_map::Entry::Vacant(e) = toml_output_data.files.entry(get_hostname()) { [INFO] [stdout] 68 + e.insert(HashMap::new()); [INFO] [stdout] 69 + write_config(toml_output_data); [INFO] [stdout] 70 + get_config() [INFO] [stdout] 71 + } else { [INFO] [stdout] 72 + toml_output_data [INFO] [stdout] 73 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 18 | let hostname = hostname.expect("hostname"); [INFO] [stdout] | ------------------------------------------- unnecessary `let` binding [INFO] [stdout] 19 | hostname [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 18 ~ [INFO] [stdout] 19 ~ hostname.expect("hostname") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/main.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | fn find_key_for_value<'a>(map: HashMap, value: &PathBuf) -> Option { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | if !!!local_files.contains(&abs_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 55 - if !!!local_files.contains(&abs_path) { [INFO] [stdout] 55 + if !local_files.contains(&abs_path) { [INFO] [stdout] | [INFO] [stdout] 55 - if !!!local_files.contains(&abs_path) { [INFO] [stdout] 55 + if !local_files.contains(&abs_path) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | if !!!local_files.contains(&abs_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `local_files.contains(&abs_path)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | if args[0] == "" { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `args[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:85:26 [INFO] [stdout] | [INFO] [stdout] 85 | let _ = Command::new(&program_name) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `program_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Config2` is never constructed [INFO] [stdout] --> src/filedata/filedata.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | pub struct Config2 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/sync/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod sync; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/sync/sync.rs:26:42 [INFO] [stdout] | [INFO] [stdout] 26 | let abs_repo_path = fs::canonicalize(&repo_path).expect("Error getting absolute path."); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `repo_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/sync/sync.rs:56:42 [INFO] [stdout] | [INFO] [stdout] 56 | let abs_repo_path = fs::canonicalize(&repo_path).expect("Error getting absolute path."); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `repo_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sync/sync.rs:71:64 [INFO] [stdout] | [INFO] [stdout] 71 | let file_repo_abs_path = repo_to_abs_repo(&local_path, &repo_path); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `repo_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sync/sync.rs:155:8 [INFO] [stdout] | [INFO] [stdout] 155 | if !!!system_path.exists() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 155 - if !!!system_path.exists() { [INFO] [stdout] 155 + if !system_path.exists() { [INFO] [stdout] | [INFO] [stdout] 155 - if !!!system_path.exists() { [INFO] [stdout] 155 + if !system_path.exists() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sync/sync.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | if !!!system_path.exists() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `system_path.exists()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sync/sync.rs:164:8 [INFO] [stdout] | [INFO] [stdout] 164 | if !!!repo_path.exists() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 164 - if !!!repo_path.exists() { [INFO] [stdout] 164 + if !repo_path.exists() { [INFO] [stdout] | [INFO] [stdout] 164 - if !!!repo_path.exists() { [INFO] [stdout] 164 + if !repo_path.exists() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sync/sync.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | if !!!repo_path.exists() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `repo_path.exists()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/filedata/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod filedata; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/filedata/filedata.rs:28:20 [INFO] [stdout] | [INFO] [stdout] 28 | repo_path.push("default".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `"default"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/filedata/filedata.rs:48:24 [INFO] [stdout] | [INFO] [stdout] 48 | let path_buf = PathBuf::from(local_home_dir).join(path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `local_home_dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/filedata/filedata.rs:58:8 [INFO] [stdout] | [INFO] [stdout] 58 | if !!!get_config_path().exists() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 58 - if !!!get_config_path().exists() { [INFO] [stdout] 58 + if !get_config_path().exists() { [INFO] [stdout] | [INFO] [stdout] 58 - if !!!get_config_path().exists() { [INFO] [stdout] 58 + if !get_config_path().exists() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/filedata/filedata.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | if !!!get_config_path().exists() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `get_config_path().exists()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/filedata/filedata.rs:67:8 [INFO] [stdout] | [INFO] [stdout] 67 | if !!!toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 67 - if !!!toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] 67 + if !toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] | [INFO] [stdout] 67 - if !!!toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] 67 + if !toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/filedata/filedata.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | if !!!toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `toml_output_data.files.contains_key(&get_hostname())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/filedata/filedata.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | / if !!!toml_output_data.files.contains_key(&get_hostname()) { [INFO] [stdout] 68 | | toml_output_data.files.insert(get_hostname(), HashMap::new()); [INFO] [stdout] 69 | | write_config(toml_output_data); [INFO] [stdout] 70 | | get_config() [INFO] [stdout] ... | [INFO] [stdout] 73 | | toml_output_data [INFO] [stdout] 74 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 67 ~ if let std::collections::hash_map::Entry::Vacant(e) = toml_output_data.files.entry(get_hostname()) { [INFO] [stdout] 68 + e.insert(HashMap::new()); [INFO] [stdout] 69 + write_config(toml_output_data); [INFO] [stdout] 70 + get_config() [INFO] [stdout] 71 + } else { [INFO] [stdout] 72 + toml_output_data [INFO] [stdout] 73 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 18 | let hostname = hostname.expect("hostname"); [INFO] [stdout] | ------------------------------------------- unnecessary `let` binding [INFO] [stdout] 19 | hostname [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 18 ~ [INFO] [stdout] 19 ~ hostname.expect("hostname") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/main.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | fn find_key_for_value<'a>(map: HashMap, value: &PathBuf) -> Option { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | if !!!local_files.contains(&abs_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 55 - if !!!local_files.contains(&abs_path) { [INFO] [stdout] 55 + if !local_files.contains(&abs_path) { [INFO] [stdout] | [INFO] [stdout] 55 - if !!!local_files.contains(&abs_path) { [INFO] [stdout] 55 + if !local_files.contains(&abs_path) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | if !!!local_files.contains(&abs_path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `local_files.contains(&abs_path)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | if args[0] == "" { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `args[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:85:26 [INFO] [stdout] | [INFO] [stdout] 85 | let _ = Command::new(&program_name) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `program_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 19.08s [INFO] running `Command { std: "docker" "inspect" "f073fd6956c4727526eaa1fbe7e892c0958bace915ecc975c03f7e8a7eea8190", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f073fd6956c4727526eaa1fbe7e892c0958bace915ecc975c03f7e8a7eea8190", kill_on_drop: false }` [INFO] [stdout] f073fd6956c4727526eaa1fbe7e892c0958bace915ecc975c03f7e8a7eea8190