[INFO] cloning repository https://github.com/skandabhairava/pie-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/skandabhairava/pie-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fskandabhairava%2Fpie-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fskandabhairava%2Fpie-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 75ec4571b6bd98a70b0f02f435147930c4f4de5b [INFO] linting skandabhairava/pie-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fskandabhairava%2Fpie-rust" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/skandabhairava/pie-rust [INFO] finished tweaking git repo https://github.com/skandabhairava/pie-rust [INFO] tweaked toml for git repo https://github.com/skandabhairava/pie-rust written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/skandabhairava/pie-rust 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/skandabhairava/pie-rust 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] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded spinach v2.1.0 [INFO] [stderr] Downloaded ctrlc v3.2.2 [INFO] [stderr] Downloaded random-string v1.0.0 [INFO] [stderr] Downloaded sha1 v0.10.1 [INFO] [stderr] Downloaded remove_dir_all v0.7.0 [INFO] [stderr] Downloaded syn v1.0.94 [INFO] [stderr] Downloaded nix v0.24.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 844aa7a8d27b870dde5b7c11e3f368cf0436d5e418f9034d3ee0fafa8863b55f [INFO] running `Command { std: "docker" "start" "-a" "844aa7a8d27b870dde5b7c11e3f368cf0436d5e418f9034d3ee0fafa8863b55f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "844aa7a8d27b870dde5b7c11e3f368cf0436d5e418f9034d3ee0fafa8863b55f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "844aa7a8d27b870dde5b7c11e3f368cf0436d5e418f9034d3ee0fafa8863b55f", kill_on_drop: false }` [INFO] [stdout] 844aa7a8d27b870dde5b7c11e3f368cf0436d5e418f9034d3ee0fafa8863b55f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] cf33672795ba79d250cf2d7da16f74ed090300a03ac987f57634f25a0ce79d15 [INFO] running `Command { std: "docker" "start" "-a" "cf33672795ba79d250cf2d7da16f74ed090300a03ac987f57634f25a0ce79d15", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.125 [INFO] [stderr] Compiling generic-array v0.14.5 [INFO] [stderr] Compiling syn v1.0.94 [INFO] [stderr] Checking subtle v2.4.1 [INFO] [stderr] Compiling zstd-safe v4.1.6+zstd.1.5.2 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Checking base64ct v1.0.1 [INFO] [stderr] Checking miniz_oxide v0.5.1 [INFO] [stderr] Checking os_str_bytes v6.0.1 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Checking constant_time_eq v0.1.5 [INFO] [stderr] Checking textwrap v0.15.0 [INFO] [stderr] Checking walkdir v2.3.2 [INFO] [stderr] Checking random-string v1.0.0 [INFO] [stderr] Checking spinach v2.1.0 [INFO] [stderr] Checking password-hash v0.3.2 [INFO] [stderr] Compiling jobserver v0.1.24 [INFO] [stderr] Checking clap_lex v0.2.0 [INFO] [stderr] Compiling cc v1.0.73 [INFO] [stderr] Checking block-buffer v0.10.2 [INFO] [stderr] Checking crypto-common v0.1.3 [INFO] [stderr] Checking cipher v0.3.0 [INFO] [stderr] Checking aes v0.7.5 [INFO] [stderr] Checking digest v0.10.3 [INFO] [stderr] Checking flate2 v1.0.23 [INFO] [stderr] Checking time v0.3.9 [INFO] [stderr] Checking nix v0.24.1 [INFO] [stderr] Checking dirs-sys v0.3.7 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking remove_dir_all v0.7.0 [INFO] [stderr] Compiling zstd-sys v1.6.3+zstd.1.5.2 [INFO] [stderr] Compiling bzip2-sys v0.1.11+1.0.8 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking sha2 v0.10.2 [INFO] [stderr] Checking sha1 v0.10.1 [INFO] [stderr] Checking directories v4.0.1 [INFO] [stderr] Checking pbkdf2 v0.10.1 [INFO] [stderr] Checking ctrlc v3.2.2 [INFO] [stderr] Checking bzip2 v0.4.3 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling serde_derive v1.0.137 [INFO] [stderr] Compiling clap_derive v3.1.18 [INFO] [stderr] Checking clap v3.1.18 [INFO] [stderr] Checking serde v1.0.137 [INFO] [stderr] Checking serde_json v1.0.81 [INFO] [stderr] Checking zstd v0.10.2+zstd.1.5.2 [INFO] [stderr] Checking zip v0.6.2 [INFO] [stderr] Checking pie v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/config.rs:67:40 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn start_config_if_not(config_loc: &PathBuf) -> Result<()>{ [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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 67 - pub fn start_config_if_not(config_loc: &PathBuf) -> Result<()>{ [INFO] [stdout] 67 + pub fn start_config_if_not(config_loc: &Path) -> Result<()>{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/out_commands.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 18 | if !project_conf_result.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `project_conf_result.is_ok()` [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: called `unwrap` on `project_conf_result` after checking its variant with `is_err` [INFO] [stdout] --> src/commands/out_commands.rs:19:25 [INFO] [stdout] | [INFO] [stdout] 18 | if !project_conf_result.is_err() { [INFO] [stdout] | ---------------------------- the check is happening here [INFO] [stdout] 19 | return Some(project_conf_result.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] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/commands/out_commands.rs:14:25 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn is_in_proj(path: &PathBuf) -> Option{ [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] 14 - pub fn is_in_proj(path: &PathBuf) -> Option{ [INFO] [stdout] 14 + pub fn is_in_proj(path: &Path) -> Option{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `println!` args [INFO] [stdout] --> src/commands/out_commands.rs:91:8 [INFO] [stdout] | [INFO] [stdout] 91 | ... println!("{}", format!("{}{}{}", Color::Red.paint("X |> '"), Color::Red.bold().paint(&path[0]), Color::Red.paint("' is not a valid pie project"))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/commands/out_commands.rs:99:22 [INFO] [stdout] | [INFO] [stdout] 99 | in_commands::run((&path[1..]).to_vec(), conf)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `path[1..]` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/commands/out_commands.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | if !(&path[0]).ends_with(".py"){ [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `path[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: `format!` in `println!` args [INFO] [stdout] --> src/commands/out_commands.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | ... println!("{}", format!("{}{}{}", Color::Red.paint("X |> '"), Color::Red.bold().paint(&path[0]), Color::Red.paint("' is not a valid .py script"))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/commands/out_commands.rs:149:27 [INFO] [stdout] | [INFO] [stdout] 149 | zip.write_all(&*buffer)?; [INFO] [stdout] | ^^^^^^^^ help: try: `&buffer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/out_commands.rs:169:29 [INFO] [stdout] | [INFO] [stdout] 169 | let file = File::create(&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_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/commands/out_commands.rs:182:27 [INFO] [stdout] | [INFO] [stdout] 182 | let file = File::open(&fname)?; [INFO] [stdout] | ^^^^^^ help: change this to: `fname` [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: unnecessary use of `to_owned` [INFO] [stdout] --> src/commands/out_commands.rs:191:37 [INFO] [stdout] | [INFO] [stdout] 191 | Some(path) => dest.join(path.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `path` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/out_commands.rs:200:40 [INFO] [stdout] | [INFO] [stdout] 200 | fs::create_dir_all(&p)?; [INFO] [stdout] | ^^ help: change this to: `p` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/out_commands.rs:258:43 [INFO] [stdout] | [INFO] [stdout] 258 | let result = env::set_current_dir(&project_dir_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `project_dir_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 `if` statement can be collapsed [INFO] [stdout] --> src/commands/out_commands.rs:307:5 [INFO] [stdout] | [INFO] [stdout] 307 | / if force { [INFO] [stdout] 308 | | if project_pie.exists() { [INFO] [stdout] 309 | | fs::remove_file(project_pie).expect("Could not delete 'project.pie'"); [INFO] [stdout] 310 | | } [INFO] [stdout] 311 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 307 ~ if force [INFO] [stdout] 308 ~ && project_pie.exists() { [INFO] [stdout] 309 | fs::remove_file(project_pie).expect("Could not delete 'project.pie'"); [INFO] [stdout] 310 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands/out_commands.rs:329:5 [INFO] [stdout] | [INFO] [stdout] 329 | / match compress(project, env::current_dir()?.join(format!("{}.pie", project)).to_str().unwrap(), zip::CompressionMethod::Stored){ [INFO] [stdout] 330 | | Err(_) => {err = true;}, [INFO] [stdout] 331 | | _ => {} [INFO] [stdout] 332 | | } [INFO] [stdout] | |_____^ help: try: `if let Err(_) = compress(project, env::current_dir()?.join(format!("{}.pie", project)).to_str().unwrap(), zip::CompressionMethod::Stored) {err = true;}` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/out_commands.rs:382:16 [INFO] [stdout] | [INFO] [stdout] 382 | if !project_conf_result.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `project_conf_result.is_ok()` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/out_commands.rs:403:25 [INFO] [stdout] | [INFO] [stdout] 403 | fs::remove_file(&config_loc).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `config_loc` [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/commands/out_commands.rs:405:10 [INFO] [stdout] | [INFO] [stdout] 405 | func(&config_loc).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `config_loc` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/out_commands.rs:437:39 [INFO] [stdout] | [INFO] [stdout] 437 | let result = env::set_current_dir(&relative_path); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `relative_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: function call inside of `expect` [INFO] [stdout] --> src/commands/out_commands.rs:474:42 [INFO] [stdout] | [INFO] [stdout] 474 | ...().expect(&Color::Red.paint("Could not read main config file. Please run the 'cfg' command to rewrite the config file.").to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("{}", Color::Red.paint("Could not read main config file. Please run the 'cfg' command to rewrite the config file.").to_string()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/config.rs:67:40 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn start_config_if_not(config_loc: &PathBuf) -> Result<()>{ [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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 67 - pub fn start_config_if_not(config_loc: &PathBuf) -> Result<()>{ [INFO] [stdout] 67 + pub fn start_config_if_not(config_loc: &Path) -> Result<()>{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/out_commands.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 18 | if !project_conf_result.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `project_conf_result.is_ok()` [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: called `unwrap` on `project_conf_result` after checking its variant with `is_err` [INFO] [stdout] --> src/commands/out_commands.rs:19:25 [INFO] [stdout] | [INFO] [stdout] 18 | if !project_conf_result.is_err() { [INFO] [stdout] | ---------------------------- the check is happening here [INFO] [stdout] 19 | return Some(project_conf_result.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] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/commands/out_commands.rs:14:25 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn is_in_proj(path: &PathBuf) -> Option{ [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] 14 - pub fn is_in_proj(path: &PathBuf) -> Option{ [INFO] [stdout] 14 + pub fn is_in_proj(path: &Path) -> Option{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/commands/in_commands.rs:180:8 [INFO] [stdout] | [INFO] [stdout] 180 | if cmd != ""{ [INFO] [stdout] | ^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cmd.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: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/commands/in_commands.rs:210:31 [INFO] [stdout] | [INFO] [stdout] 210 | let project_conf = if let None = is_in_proj{ [INFO] [stdout] | -------^^^^------------- help: try: `if is_in_proj.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` 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/commands/in_commands.rs:242:27 [INFO] [stdout] | [INFO] [stdout] 242 | run_cmd(main_cmd, &args, should_display_output, || {}, || {}); [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: `format!` in `println!` args [INFO] [stdout] --> src/commands/out_commands.rs:91:8 [INFO] [stdout] | [INFO] [stdout] 91 | ... println!("{}", format!("{}{}{}", Color::Red.paint("X |> '"), Color::Red.bold().paint(&path[0]), Color::Red.paint("' is not a valid pie project"))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/commands/out_commands.rs:99:22 [INFO] [stdout] | [INFO] [stdout] 99 | in_commands::run((&path[1..]).to_vec(), conf)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `path[1..]` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:30:19 [INFO] [stdout] | [INFO] [stdout] 30 | } else if (&args[1]).ends_with(".py") { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `args[1]` [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: `format!` in `println!` args [INFO] [stdout] --> src/main.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | ... println!("{}", format!("{}{}{}", Color::Red.paint("X |> '"), Color::Red.bold().paint(&args[1]), Color::Red.paint("' Python file does not exist."))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/commands/out_commands.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | if !(&path[0]).ends_with(".py"){ [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `path[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: `format!` in `println!` args [INFO] [stdout] --> src/commands/out_commands.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | ... println!("{}", format!("{}{}{}", Color::Red.paint("X |> '"), Color::Red.bold().paint(&path[0]), Color::Red.paint("' is not a valid .py script"))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/commands/out_commands.rs:149:27 [INFO] [stdout] | [INFO] [stdout] 149 | zip.write_all(&*buffer)?; [INFO] [stdout] | ^^^^^^^^ help: try: `&buffer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/out_commands.rs:169:29 [INFO] [stdout] | [INFO] [stdout] 169 | let file = File::create(&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_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/commands/out_commands.rs:182:27 [INFO] [stdout] | [INFO] [stdout] 182 | let file = File::open(&fname)?; [INFO] [stdout] | ^^^^^^ help: change this to: `fname` [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: unnecessary use of `to_owned` [INFO] [stdout] --> src/commands/out_commands.rs:191:37 [INFO] [stdout] | [INFO] [stdout] 191 | Some(path) => dest.join(path.to_owned()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `path` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/out_commands.rs:200:40 [INFO] [stdout] | [INFO] [stdout] 200 | fs::create_dir_all(&p)?; [INFO] [stdout] | ^^ help: change this to: `p` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/out_commands.rs:258:43 [INFO] [stdout] | [INFO] [stdout] 258 | let result = env::set_current_dir(&project_dir_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `project_dir_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 `if` statement can be collapsed [INFO] [stdout] --> src/commands/out_commands.rs:307:5 [INFO] [stdout] | [INFO] [stdout] 307 | / if force { [INFO] [stdout] 308 | | if project_pie.exists() { [INFO] [stdout] 309 | | fs::remove_file(project_pie).expect("Could not delete 'project.pie'"); [INFO] [stdout] 310 | | } [INFO] [stdout] 311 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 307 ~ if force [INFO] [stdout] 308 ~ && project_pie.exists() { [INFO] [stdout] 309 | fs::remove_file(project_pie).expect("Could not delete 'project.pie'"); [INFO] [stdout] 310 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/commands/out_commands.rs:329:5 [INFO] [stdout] | [INFO] [stdout] 329 | / match compress(project, env::current_dir()?.join(format!("{}.pie", project)).to_str().unwrap(), zip::CompressionMethod::Stored){ [INFO] [stdout] 330 | | Err(_) => {err = true;}, [INFO] [stdout] 331 | | _ => {} [INFO] [stdout] 332 | | } [INFO] [stdout] | |_____^ help: try: `if let Err(_) = compress(project, env::current_dir()?.join(format!("{}.pie", project)).to_str().unwrap(), zip::CompressionMethod::Stored) {err = true;}` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands/out_commands.rs:382:16 [INFO] [stdout] | [INFO] [stdout] 382 | if !project_conf_result.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `project_conf_result.is_ok()` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/out_commands.rs:403:25 [INFO] [stdout] | [INFO] [stdout] 403 | fs::remove_file(&config_loc).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `config_loc` [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/commands/out_commands.rs:405:10 [INFO] [stdout] | [INFO] [stdout] 405 | func(&config_loc).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `config_loc` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/commands/out_commands.rs:437:39 [INFO] [stdout] | [INFO] [stdout] 437 | let result = env::set_current_dir(&relative_path); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `relative_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: function call inside of `expect` [INFO] [stdout] --> src/commands/out_commands.rs:474:42 [INFO] [stdout] | [INFO] [stdout] 474 | ...().expect(&Color::Red.paint("Could not read main config file. Please run the 'cfg' command to rewrite the config file.").to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("{}", Color::Red.paint("Could not read main config file. Please run the 'cfg' command to rewrite the config file.").to_string()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/commands/in_commands.rs:180:8 [INFO] [stdout] | [INFO] [stdout] 180 | if cmd != ""{ [INFO] [stdout] | ^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cmd.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: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/commands/in_commands.rs:210:31 [INFO] [stdout] | [INFO] [stdout] 210 | let project_conf = if let None = is_in_proj{ [INFO] [stdout] | -------^^^^------------- help: try: `if is_in_proj.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` 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/commands/in_commands.rs:242:27 [INFO] [stdout] | [INFO] [stdout] 242 | run_cmd(main_cmd, &args, should_display_output, || {}, || {}); [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:30:19 [INFO] [stdout] | [INFO] [stdout] 30 | } else if (&args[1]).ends_with(".py") { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `args[1]` [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: `format!` in `println!` args [INFO] [stdout] --> src/main.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | ... println!("{}", format!("{}{}{}", Color::Red.paint("X |> '"), Color::Red.bold().paint(&args[1]), Color::Red.paint("' Python file does not exist."))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 51.77s [INFO] running `Command { std: "docker" "inspect" "cf33672795ba79d250cf2d7da16f74ed090300a03ac987f57634f25a0ce79d15", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "cf33672795ba79d250cf2d7da16f74ed090300a03ac987f57634f25a0ce79d15", kill_on_drop: false }` [INFO] [stdout] cf33672795ba79d250cf2d7da16f74ed090300a03ac987f57634f25a0ce79d15