[INFO] cloning repository https://github.com/dduan/mmm [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/dduan/mmm" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdduan%2Fmmm", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdduan%2Fmmm'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f4f1182f85c843c26a420a4f62c658ced1a80c61 [INFO] linting dduan/mmm against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdduan%2Fmmm" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/dduan/mmm [INFO] finished tweaking git repo https://github.com/dduan/mmm [INFO] tweaked toml for git repo https://github.com/dduan/mmm written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/dduan/mmm 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/dduan/mmm 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 fs_extra v1.1.0 [INFO] [stderr] Downloaded open v1.2.2 [INFO] [stderr] Downloaded termcolor v1.0.4 [INFO] [stderr] Downloaded getch v0.2.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 85361778ebda3f90710d62386ab2dc9809204d0c5a1acc2786beaf8621625533 [INFO] running `Command { std: "docker" "start" "-a" "85361778ebda3f90710d62386ab2dc9809204d0c5a1acc2786beaf8621625533", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "85361778ebda3f90710d62386ab2dc9809204d0c5a1acc2786beaf8621625533", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "85361778ebda3f90710d62386ab2dc9809204d0c5a1acc2786beaf8621625533", kill_on_drop: false }` [INFO] [stdout] 85361778ebda3f90710d62386ab2dc9809204d0c5a1acc2786beaf8621625533 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 2a8b6a64d4fbc1660c7430465b2845af00f14b7994d4c1e6324c7088cb5a6e4f [INFO] running `Command { std: "docker" "start" "-a" "2a8b6a64d4fbc1660c7430465b2845af00f14b7994d4c1e6324c7088cb5a6e4f", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.55 [INFO] [stderr] Checking open v1.2.2 [INFO] [stderr] Checking termcolor v1.0.4 [INFO] [stderr] Checking fs_extra v1.1.0 [INFO] [stderr] Checking termios v0.2.2 [INFO] [stderr] Checking atty v0.2.11 [INFO] [stderr] Checking getch v0.2.1 [INFO] [stderr] Checking mmm v0.1.4 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/mmm.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | use atty; [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/mmm.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use getch; [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: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/mmm/commands/mod.rs:69:34 [INFO] [stdout] | [INFO] [stdout] 69 | pub fn all_commands() -> Vec> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 69 | pub fn all_commands() -> Vec> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/mmm.rs:19:29 [INFO] [stdout] | [INFO] [stdout] 19 | fn run_command(command: Box, path: &String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 19 | fn run_command(command: Box, path: &String) { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/mmm.rs:59:51 [INFO] [stdout] | [INFO] [stdout] 59 | fn commands_to_show(path_exists: bool) -> Vec> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 59 | fn commands_to_show(path_exists: bool) -> Vec> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/mmm.rs:70:45 [INFO] [stdout] | [INFO] [stdout] 70 | fn user_select_from_menu(commands: &Vec>) -> char { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 70 | fn user_select_from_menu(commands: &Vec>) -> char { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/mmm.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | use atty; [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/mmm.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use getch; [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/mmm/commands/mod.rs:16:29 [INFO] [stdout] | [INFO] [stdout] 16 | fn exe_msg(&self, path: &String) -> Option; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/mmm/commands/mod.rs:19:37 [INFO] [stdout] | [INFO] [stdout] 19 | fn followup_prompt(&self, path: &String) -> Buffer { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - fn followup_prompt(&self, path: &String) -> Buffer { [INFO] [stdout] 19 + fn followup_prompt(&self, path: &str) -> Buffer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/mmm/commands/mod.rs:30:29 [INFO] [stdout] | [INFO] [stdout] 30 | fn execute(&self, path: &String, followup_input: Option) -> bool; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/mmm/commands/copy_command.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | print!("\n") [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 24 - print!("\n") [INFO] [stdout] 24 + println!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/mmm/commands/delete_command.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let result: bool; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `result` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 50 ~ [INFO] [stdout] 51 ~ let result: bool = if Path::new(path).is_dir() { [INFO] [stdout] 52 ~ fs::remove_dir_all(path).is_ok() [INFO] [stdout] 53 | } else { [INFO] [stdout] 54 ~ fs::remove_file(path).is_ok() [INFO] [stdout] 55 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/mmm/commands/edit_command.rs:25:56 [INFO] [stdout] | [INFO] [stdout] 25 | let mut editor_command = process::Command::new(format!("{}", self.editor.as_ref().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `self.editor.as_ref().unwrap().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/mmm/commands/mod.rs:69:34 [INFO] [stdout] | [INFO] [stdout] 69 | pub fn all_commands() -> Vec> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 69 | pub fn all_commands() -> Vec> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `ok().expect()` on a `Result` value [INFO] [stdout] --> src/mmm/commands/edit_command.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | / editor_command [INFO] [stdout] 28 | | .spawn() [INFO] [stdout] 29 | | .ok() [INFO] [stdout] 30 | | .expect("Couldn't launch editor") [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stdout] = note: `#[warn(clippy::ok_expect)]` on by default [INFO] [stdout] help: call `expect()` directly on the `Result` [INFO] [stdout] | [INFO] [stdout] 28 - .spawn() [INFO] [stdout] 29 - .ok() [INFO] [stdout] 30 - .expect("Couldn't launch editor") [INFO] [stdout] 28 + .spawn().expect("Couldn't launch editor") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/mmm.rs:19:29 [INFO] [stdout] | [INFO] [stdout] 19 | fn run_command(command: Box, path: &String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 19 | fn run_command(command: Box, path: &String) { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mmm/commands/git_command.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | if !git_proc.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `git_proc.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/mmm.rs:59:51 [INFO] [stdout] | [INFO] [stdout] 59 | fn commands_to_show(path_exists: bool) -> Vec> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 59 | fn commands_to_show(path_exists: bool) -> Vec> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/mmm.rs:70:45 [INFO] [stdout] | [INFO] [stdout] 70 | fn user_select_from_menu(commands: &Vec>) -> char { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 70 | fn user_select_from_menu(commands: &Vec>) -> char { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/mmm/commands/git_command.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | write!(&mut buffer, "`\n").expect("Buffer write failure"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 84 - write!(&mut buffer, "`\n").expect("Buffer write failure"); [INFO] [stdout] 84 + writeln!(&mut buffer, "`").expect("Buffer write failure"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/mmm/commands/move_command.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | write!(buffer, "\n").expect("Buffer write error"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 22 - write!(buffer, "\n").expect("Buffer write error"); [INFO] [stdout] 22 + writeln!(buffer).expect("Buffer write error"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mmm/commands/open_command.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | return result.is_ok() && result.unwrap().success(); [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] 17 - return result.is_ok() && result.unwrap().success(); [INFO] [stdout] 17 + result.is_ok() && result.unwrap().success() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `message` after checking its variant with `is_some` [INFO] [stdout] --> src/mmm.rs:22:20 [INFO] [stdout] | [INFO] [stdout] 21 | if message.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = message` [INFO] [stdout] 22 | utils::log(message.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mmm.rs:20:35 [INFO] [stdout] | [INFO] [stdout] 20 | let message = command.exe_msg(&path); [INFO] [stdout] | ^^^^^ help: change this to: `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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mmm.rs:28:80 [INFO] [stdout] | [INFO] [stdout] 28 | BufferWriter::stdout(ColorChoice::Auto).print(&command.followup_prompt(&path)).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `path` [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/mmm.rs:36:24 [INFO] [stdout] | [INFO] [stdout] 36 | if command.execute(&path, followup_input) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/mmm.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | write!(buffer, "?\n").expect("Buffer write error"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 52 - write!(buffer, "?\n").expect("Buffer write error"); [INFO] [stdout] 52 + writeln!(buffer, "?").expect("Buffer write error"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/mmm.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | write!(buffer, " doesn't exists yet, what's next?\n").expect("Buffer write error"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 55 - write!(buffer, " doesn't exists yet, what's next?\n").expect("Buffer write error"); [INFO] [stdout] 55 + writeln!(buffer, " doesn't exists yet, what's next?").expect("Buffer write error"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mmm.rs:94:5 [INFO] [stdout] | [INFO] [stdout] 94 | return selection [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] 94 - return selection [INFO] [stdout] 94 + selection [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/mmm.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 91 - print!("\n"); [INFO] [stdout] 91 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mmm.rs:109:34 [INFO] [stdout] | [INFO] [stdout] 109 | run_command(command, &path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/mmm/commands/mod.rs:16:29 [INFO] [stdout] | [INFO] [stdout] 16 | fn exe_msg(&self, path: &String) -> Option; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/mmm/commands/mod.rs:19:37 [INFO] [stdout] | [INFO] [stdout] 19 | fn followup_prompt(&self, path: &String) -> Buffer { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - fn followup_prompt(&self, path: &String) -> Buffer { [INFO] [stdout] 19 + fn followup_prompt(&self, path: &str) -> Buffer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/mmm/commands/mod.rs:30:29 [INFO] [stdout] | [INFO] [stdout] 30 | fn execute(&self, path: &String, followup_input: Option) -> bool; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/mmm/commands/copy_command.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | print!("\n") [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 24 - print!("\n") [INFO] [stdout] 24 + println!() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/mmm/commands/delete_command.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let result: bool; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `result` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 50 ~ [INFO] [stdout] 51 ~ let result: bool = if Path::new(path).is_dir() { [INFO] [stdout] 52 ~ fs::remove_dir_all(path).is_ok() [INFO] [stdout] 53 | } else { [INFO] [stdout] 54 ~ fs::remove_file(path).is_ok() [INFO] [stdout] 55 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/mmm/commands/edit_command.rs:25:56 [INFO] [stdout] | [INFO] [stdout] 25 | let mut editor_command = process::Command::new(format!("{}", self.editor.as_ref().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `self.editor.as_ref().unwrap().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `ok().expect()` on a `Result` value [INFO] [stdout] --> src/mmm/commands/edit_command.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | / editor_command [INFO] [stdout] 28 | | .spawn() [INFO] [stdout] 29 | | .ok() [INFO] [stdout] 30 | | .expect("Couldn't launch editor") [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stdout] = note: `#[warn(clippy::ok_expect)]` on by default [INFO] [stdout] help: call `expect()` directly on the `Result` [INFO] [stdout] | [INFO] [stdout] 28 - .spawn() [INFO] [stdout] 29 - .ok() [INFO] [stdout] 30 - .expect("Couldn't launch editor") [INFO] [stdout] 28 + .spawn().expect("Couldn't launch editor") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mmm/commands/git_command.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | if !git_proc.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `git_proc.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/mmm/commands/git_command.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | write!(&mut buffer, "`\n").expect("Buffer write failure"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 84 - write!(&mut buffer, "`\n").expect("Buffer write failure"); [INFO] [stdout] 84 + writeln!(&mut buffer, "`").expect("Buffer write failure"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.52s [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/mmm/commands/move_command.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | write!(buffer, "\n").expect("Buffer write error"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 22 - write!(buffer, "\n").expect("Buffer write error"); [INFO] [stdout] 22 + writeln!(buffer).expect("Buffer write error"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mmm/commands/open_command.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | return result.is_ok() && result.unwrap().success(); [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] 17 - return result.is_ok() && result.unwrap().success(); [INFO] [stdout] 17 + result.is_ok() && result.unwrap().success() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `message` after checking its variant with `is_some` [INFO] [stdout] --> src/mmm.rs:22:20 [INFO] [stdout] | [INFO] [stdout] 21 | if message.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = message` [INFO] [stdout] 22 | utils::log(message.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mmm.rs:20:35 [INFO] [stdout] | [INFO] [stdout] 20 | let message = command.exe_msg(&path); [INFO] [stdout] | ^^^^^ help: change this to: `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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mmm.rs:28:80 [INFO] [stdout] | [INFO] [stdout] 28 | BufferWriter::stdout(ColorChoice::Auto).print(&command.followup_prompt(&path)).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `path` [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/mmm.rs:36:24 [INFO] [stdout] | [INFO] [stdout] 36 | if command.execute(&path, followup_input) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/mmm.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | write!(buffer, "?\n").expect("Buffer write error"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 52 - write!(buffer, "?\n").expect("Buffer write error"); [INFO] [stdout] 52 + writeln!(buffer, "?").expect("Buffer write error"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/mmm.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | write!(buffer, " doesn't exists yet, what's next?\n").expect("Buffer write error"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 55 - write!(buffer, " doesn't exists yet, what's next?\n").expect("Buffer write error"); [INFO] [stdout] 55 + writeln!(buffer, " doesn't exists yet, what's next?").expect("Buffer write error"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mmm.rs:94:5 [INFO] [stdout] | [INFO] [stdout] 94 | return selection [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] 94 - return selection [INFO] [stdout] 94 + selection [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/mmm.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 91 - print!("\n"); [INFO] [stdout] 91 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mmm.rs:109:34 [INFO] [stdout] | [INFO] [stdout] 109 | run_command(command, &path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [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] warning: the following packages contain code that will be rejected by a future version of Rust: fs_extra v1.1.0 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 4` [INFO] running `Command { std: "docker" "inspect" "2a8b6a64d4fbc1660c7430465b2845af00f14b7994d4c1e6324c7088cb5a6e4f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2a8b6a64d4fbc1660c7430465b2845af00f14b7994d4c1e6324c7088cb5a6e4f", kill_on_drop: false }` [INFO] [stdout] 2a8b6a64d4fbc1660c7430465b2845af00f14b7994d4c1e6324c7088cb5a6e4f