[INFO] cloning repository https://github.com/Tiago-0liveira/qdc [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Tiago-0liveira/qdc" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTiago-0liveira%2Fqdc", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTiago-0liveira%2Fqdc'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 1d946212a342abd0794fe9c56998f6955cf972db [INFO] linting Tiago-0liveira/qdc against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTiago-0liveira%2Fqdc" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Tiago-0liveira/qdc [INFO] finished tweaking git repo https://github.com/Tiago-0liveira/qdc [INFO] tweaked toml for git repo https://github.com/Tiago-0liveira/qdc written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Tiago-0liveira/qdc 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/Tiago-0liveira/qdc 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 colored v2.0.0 [INFO] [stderr] Downloaded serde_json v1.0.71 [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] 1c202b35e6640a28038e754b2b941a813fbc705c36baacd87c7757a07ddc0e4b [INFO] running `Command { std: "docker" "start" "-a" "1c202b35e6640a28038e754b2b941a813fbc705c36baacd87c7757a07ddc0e4b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1c202b35e6640a28038e754b2b941a813fbc705c36baacd87c7757a07ddc0e4b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1c202b35e6640a28038e754b2b941a813fbc705c36baacd87c7757a07ddc0e4b", kill_on_drop: false }` [INFO] [stdout] 1c202b35e6640a28038e754b2b941a813fbc705c36baacd87c7757a07ddc0e4b [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] b148e2ef63abb4ce122616ce85cc289a9a0598ecfe7e192a9405938f08a28e07 [INFO] running `Command { std: "docker" "start" "-a" "b148e2ef63abb4ce122616ce85cc289a9a0598ecfe7e192a9405938f08a28e07", kill_on_drop: false }` [INFO] [stderr] Compiling syn v1.0.81 [INFO] [stderr] Compiling serde_derive v1.0.130 [INFO] [stderr] Compiling libc v0.2.108 [INFO] [stderr] Compiling ryu v1.0.5 [INFO] [stderr] Compiling serde v1.0.130 [INFO] [stderr] Compiling serde_json v1.0.71 [INFO] [stderr] Checking itoa v0.4.8 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking colored v2.0.0 [INFO] [stderr] Checking qdc v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use std; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use std; [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: unneeded `return` statement [INFO] [stdout] --> src/Command.rs:39:3 [INFO] [stdout] | [INFO] [stdout] 39 | / ... return [ [INFO] [stdout] 40 | | ... Command::new("new", "Creates a new shortcut", " ", ('n', "new"), 2), [INFO] [stdout] 41 | | ... Command::new("help", "Shows the commands list or helps with a specific command", " ", ('h... [INFO] [stdout] 42 | | ... Command::new("shortcuts", "Shows the shortcuts list", "", ('s', "shortcuts"), 0), [INFO] [stdout] 43 | | ... Command::new("edit", "Edits a shortcut", " ", ('... [INFO] [stdout] 44 | | ... Command::new("delete", "Deletes a shortcut", " ", ('d', "del"), 1), [INFO] [stdout] 45 | | ... ]; [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] 39 ~ [ [INFO] [stdout] 40 ~ Command::new("new", "Creates a new shortcut", " ", ('n', "new"), 2), [INFO] [stdout] 41 ~ Command::new("help", "Shows the commands list or helps with a specific command", " ", ('h', "help"), 0), [INFO] [stdout] 42 ~ Command::new("shortcuts", "Shows the shortcuts list", "", ('s', "shortcuts"), 0), [INFO] [stdout] 43 ~ Command::new("edit", "Edits a shortcut", " ", ('e', "edit"), 3), [INFO] [stdout] 44 ~ Command::new("delete", "Deletes a shortcut", " ", ('d', "del"), 1), [INFO] [stdout] 45 ~ ] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/Helper.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | return Path::new(&v.join("\\")).to_path_buf(); [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] 37 - return Path::new(&v.join("\\")).to_path_buf(); [INFO] [stdout] 37 + Path::new(&v.join("\\")).to_path_buf() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/Command.rs:39:3 [INFO] [stdout] | [INFO] [stdout] 39 | / ... return [ [INFO] [stdout] 40 | | ... Command::new("new", "Creates a new shortcut", " ", ('n', "new"), 2), [INFO] [stdout] 41 | | ... Command::new("help", "Shows the commands list or helps with a specific command", " ", ('h... [INFO] [stdout] 42 | | ... Command::new("shortcuts", "Shows the shortcuts list", "", ('s', "shortcuts"), 0), [INFO] [stdout] 43 | | ... Command::new("edit", "Edits a shortcut", " ", ('... [INFO] [stdout] 44 | | ... Command::new("delete", "Deletes a shortcut", " ", ('d', "del"), 1), [INFO] [stdout] 45 | | ... ]; [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] 39 ~ [ [INFO] [stdout] 40 ~ Command::new("new", "Creates a new shortcut", " ", ('n', "new"), 2), [INFO] [stdout] 41 ~ Command::new("help", "Shows the commands list or helps with a specific command", " ", ('h', "help"), 0), [INFO] [stdout] 42 ~ Command::new("shortcuts", "Shows the shortcuts list", "", ('s', "shortcuts"), 0), [INFO] [stdout] 43 ~ Command::new("edit", "Edits a shortcut", " ", ('e', "edit"), 3), [INFO] [stdout] 44 ~ Command::new("delete", "Deletes a shortcut", " ", ('d', "del"), 1), [INFO] [stdout] 45 ~ ] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/Helper.rs:35:16 [INFO] [stdout] | [INFO] [stdout] 35 | let mut v = (&self).to_str().unwrap().split("\\").collect::>(); [INFO] [stdout] | ^^^^^^^ help: change this to: `self` [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: unneeded `return` statement [INFO] [stdout] --> src/Helper.rs:65:3 [INFO] [stdout] | [INFO] [stdout] 65 | return Path::new(&path).back().join(RECORDS_FILE_PATH); [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] 65 - return Path::new(&path).back().join(RECORDS_FILE_PATH); [INFO] [stdout] 65 + Path::new(&path).back().join(RECORDS_FILE_PATH) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/Helper.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | return data.unwrap(); [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] 72 - return data.unwrap(); [INFO] [stdout] 72 + data.unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | if (&args).len() > 1 { [INFO] [stdout] | ^^^^^^^ help: change this to: `args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:127:16 [INFO] [stdout] | [INFO] [stdout] 127 | if !rec.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `rec.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:153:16 [INFO] [stdout] | [INFO] [stdout] 153 | if !rec.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `rec.is_some()` [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: unneeded `return` statement [INFO] [stdout] --> src/Helper.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | return Path::new(&v.join("\\")).to_path_buf(); [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] 37 - return Path::new(&v.join("\\")).to_path_buf(); [INFO] [stdout] 37 + Path::new(&v.join("\\")).to_path_buf() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/Helper.rs:35:16 [INFO] [stdout] | [INFO] [stdout] 35 | let mut v = (&self).to_str().unwrap().split("\\").collect::>(); [INFO] [stdout] | ^^^^^^^ help: change this to: `self` [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: called `unwrap` on `com` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:106:31 [INFO] [stdout] | [INFO] [stdout] 101 | if com.is_none() { [INFO] [stdout] | ---------------- help: try: `if let Some() = com` [INFO] [stdout] ... [INFO] [stdout] 106 | let com = com.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `rec` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:154:31 [INFO] [stdout] | [INFO] [stdout] 153 | if !rec.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 154 | let record = &rec.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:34:19 [INFO] [stdout] | [INFO] [stdout] 34 | c.name == (&first_arg).to_string() || [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&first_arg)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:34:19 [INFO] [stdout] | [INFO] [stdout] 34 | c.name == (&first_arg).to_string() || [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `first_arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:35:29 [INFO] [stdout] | [INFO] [stdout] 35 | c.special_args.1 == (&first_arg).to_string() || [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&first_arg)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:35:29 [INFO] [stdout] | [INFO] [stdout] 35 | c.special_args.1 == (&first_arg).to_string() || [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `first_arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:36:41 [INFO] [stdout] | [INFO] [stdout] 36 | c.special_args.0.to_string() == (&first_arg).to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&first_arg)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:36:41 [INFO] [stdout] | [INFO] [stdout] 36 | c.special_args.0.to_string() == (&first_arg).to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `first_arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:43:61 [INFO] [stdout] | [INFO] [stdout] 43 | let w = file_contents.iter().find(|s| s.name == (&first_arg).to_string()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&first_arg)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:43:61 [INFO] [stdout] | [INFO] [stdout] 43 | let w = file_contents.iter().find(|s| s.name == (&first_arg).to_string()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `first_arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | if (&com).args_num > (&args).len() - 2 { [INFO] [stdout] | ^^^^^^ help: change this to: `com` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:55:26 [INFO] [stdout] | [INFO] [stdout] 55 | if (&com).args_num > (&args).len() - 2 { [INFO] [stdout] | ^^^^^^^ help: change this to: `args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:56:89 [INFO] [stdout] | [INFO] [stdout] 56 | ... println!("Command {} requires {} arguments, args num: {}, provided args: {:?}", (&com).name.cyan(), (&com).args_num.to_string(... [INFO] [stdout] | ^^^^^^ help: change this to: `com` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:56:109 [INFO] [stdout] | [INFO] [stdout] 56 | ... {}, provided args: {:?}", (&com).name.cyan(), (&com).args_num.to_string().green(), (args.len() - 2).to_string().red(), args[2..]... [INFO] [stdout] | ^^^^^^ help: change this to: `com` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/Helper.rs:65:3 [INFO] [stdout] | [INFO] [stdout] 65 | return Path::new(&path).back().join(RECORDS_FILE_PATH); [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] 65 - return Path::new(&path).back().join(RECORDS_FILE_PATH); [INFO] [stdout] 65 + Path::new(&path).back().join(RECORDS_FILE_PATH) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/Helper.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | return data.unwrap(); [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] 72 - return data.unwrap(); [INFO] [stdout] 72 + data.unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | if (&args).len() > 1 { [INFO] [stdout] | ^^^^^^^ help: change this to: `args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:127:16 [INFO] [stdout] | [INFO] [stdout] 127 | if !rec.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `rec.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:153:16 [INFO] [stdout] | [INFO] [stdout] 153 | if !rec.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `rec.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `com` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:106:31 [INFO] [stdout] | [INFO] [stdout] 101 | if com.is_none() { [INFO] [stdout] | ---------------- help: try: `if let Some() = com` [INFO] [stdout] ... [INFO] [stdout] 106 | let com = com.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `rec` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:154:31 [INFO] [stdout] | [INFO] [stdout] 153 | if !rec.is_none() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] 154 | let record = &rec.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:34:19 [INFO] [stdout] | [INFO] [stdout] 34 | c.name == (&first_arg).to_string() || [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&first_arg)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:34:19 [INFO] [stdout] | [INFO] [stdout] 34 | c.name == (&first_arg).to_string() || [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `first_arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:35:29 [INFO] [stdout] | [INFO] [stdout] 35 | c.special_args.1 == (&first_arg).to_string() || [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&first_arg)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:35:29 [INFO] [stdout] | [INFO] [stdout] 35 | c.special_args.1 == (&first_arg).to_string() || [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `first_arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:36:41 [INFO] [stdout] | [INFO] [stdout] 36 | c.special_args.0.to_string() == (&first_arg).to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&first_arg)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:36:41 [INFO] [stdout] | [INFO] [stdout] 36 | c.special_args.0.to_string() == (&first_arg).to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `first_arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:43:61 [INFO] [stdout] | [INFO] [stdout] 43 | let w = file_contents.iter().find(|s| s.name == (&first_arg).to_string()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&first_arg)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:43:61 [INFO] [stdout] | [INFO] [stdout] 43 | let w = file_contents.iter().find(|s| s.name == (&first_arg).to_string()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `first_arg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:94:16 [INFO] [stdout] | [INFO] [stdout] 94 | if args.len() != 0 && !args[0].trim().is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:97:31 [INFO] [stdout] | [INFO] [stdout] 97 | c.name == (&comName).to_string() || [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&comName)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:98:41 [INFO] [stdout] | [INFO] [stdout] 98 | c.special_args.1 == (&comName).to_string() || [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&comName)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | if (&com).args_num > (&args).len() - 2 { [INFO] [stdout] | ^^^^^^ help: change this to: `com` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:99:53 [INFO] [stdout] | [INFO] [stdout] 99 | c.special_args.0.to_string() == (&comName).to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&comName)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:114:16 [INFO] [stdout] | [INFO] [stdout] 114 | if file_contents.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!file_contents.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/main.rs:124:40 [INFO] [stdout] | [INFO] [stdout] 124 | let rec = (&file_contents).into_iter().position(|c| [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:55:26 [INFO] [stdout] | [INFO] [stdout] 55 | if (&com).args_num > (&args).len() - 2 { [INFO] [stdout] | ^^^^^^^ help: change this to: `args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:125:51 [INFO] [stdout] | [INFO] [stdout] 125 | c.name.trim_start_matches("-") == (&args[0]).to_string().trim_start_matches("-") [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `args[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:56:89 [INFO] [stdout] | [INFO] [stdout] 56 | ... println!("Command {} requires {} arguments, args num: {}, provided args: {:?}", (&com).name.cyan(), (&com).args_num.to_string(... [INFO] [stdout] | ^^^^^^ help: change this to: `com` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/main.rs:128:50 [INFO] [stdout] | [INFO] [stdout] 128 | let rec_index = (&file_contents).into_iter().position(|c| [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:56:109 [INFO] [stdout] | [INFO] [stdout] 56 | ... {}, provided args: {:?}", (&com).name.cyan(), (&com).args_num.to_string().green(), (args.len() - 2).to_string().red(), args[2..]... [INFO] [stdout] | ^^^^^^ help: change this to: `com` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:129:55 [INFO] [stdout] | [INFO] [stdout] 129 | c.name.trim_start_matches("-") == (&args[0]).to_string().trim_start_matches("-") [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `args[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:151:27 [INFO] [stdout] | [INFO] [stdout] 151 | c.name == (&args[0]).to_string().trim_start_matches("-") [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `args[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:94:16 [INFO] [stdout] | [INFO] [stdout] 94 | if args.len() != 0 && !args[0].trim().is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:97:31 [INFO] [stdout] | [INFO] [stdout] 97 | c.name == (&comName).to_string() || [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&comName)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:98:41 [INFO] [stdout] | [INFO] [stdout] 98 | c.special_args.1 == (&comName).to_string() || [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&comName)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:99:53 [INFO] [stdout] | [INFO] [stdout] 99 | c.special_args.0.to_string() == (&comName).to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(&comName)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:114:16 [INFO] [stdout] | [INFO] [stdout] 114 | if file_contents.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!file_contents.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/main.rs:124:40 [INFO] [stdout] | [INFO] [stdout] 124 | let rec = (&file_contents).into_iter().position(|c| [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:125:51 [INFO] [stdout] | [INFO] [stdout] 125 | c.name.trim_start_matches("-") == (&args[0]).to_string().trim_start_matches("-") [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `args[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/main.rs:128:50 [INFO] [stdout] | [INFO] [stdout] 128 | let rec_index = (&file_contents).into_iter().position(|c| [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:129:55 [INFO] [stdout] | [INFO] [stdout] 129 | c.name.trim_start_matches("-") == (&args[0]).to_string().trim_start_matches("-") [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `args[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:151:27 [INFO] [stdout] | [INFO] [stdout] 151 | c.name == (&args[0]).to_string().trim_start_matches("-") [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `args[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.67s [INFO] running `Command { std: "docker" "inspect" "b148e2ef63abb4ce122616ce85cc289a9a0598ecfe7e192a9405938f08a28e07", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b148e2ef63abb4ce122616ce85cc289a9a0598ecfe7e192a9405938f08a28e07", kill_on_drop: false }` [INFO] [stdout] b148e2ef63abb4ce122616ce85cc289a9a0598ecfe7e192a9405938f08a28e07