[INFO] cloning repository https://github.com/panjd123/parabuild-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/panjd123/parabuild-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpanjd123%2Fparabuild-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpanjd123%2Fparabuild-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9bfb8be244323c3d6b6dafc755ca038e0ff0fc0e [INFO] linting panjd123/parabuild-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpanjd123%2Fparabuild-rust" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/panjd123/parabuild-rust [INFO] finished tweaking git repo https://github.com/panjd123/parabuild-rust [INFO] tweaked toml for git repo https://github.com/panjd123/parabuild-rust written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/panjd123/parabuild-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/panjd123/parabuild-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] Downloading crates ... [INFO] [stderr] Downloaded console v0.15.10 [INFO] [stderr] Downloaded clap v4.5.29 [INFO] [stderr] Downloaded clap_builder v4.5.29 [INFO] [stderr] Downloaded handlebars v6.3.1 [INFO] [stderr] Downloaded cc v1.2.13 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 5c20d68e6bc04195c74fe5a078d1ca2816a27fdf8edb55a4a8b0e493fe8a7f7a [INFO] running `Command { std: "docker" "start" "-a" "5c20d68e6bc04195c74fe5a078d1ca2816a27fdf8edb55a4a8b0e493fe8a7f7a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5c20d68e6bc04195c74fe5a078d1ca2816a27fdf8edb55a4a8b0e493fe8a7f7a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5c20d68e6bc04195c74fe5a078d1ca2816a27fdf8edb55a4a8b0e493fe8a7f7a", kill_on_drop: false }` [INFO] [stdout] 5c20d68e6bc04195c74fe5a078d1ca2816a27fdf8edb55a4a8b0e493fe8a7f7a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] fdcf4ddd6b9b911795852179b5df316b4073a0e74b6ef00a503791df2624442c [INFO] running `Command { std: "docker" "start" "-a" "fdcf4ddd6b9b911795852179b5df316b4073a0e74b6ef00a503791df2624442c", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.169 [INFO] [stderr] Compiling thiserror v2.0.11 [INFO] [stderr] Compiling once_cell v1.20.3 [INFO] [stderr] Checking bitflags v2.8.0 [INFO] [stderr] Compiling syn v2.0.98 [INFO] [stderr] Compiling nix v0.29.0 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Compiling serde v1.0.217 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Checking log v0.4.25 [INFO] [stderr] Compiling portable-atomic v1.10.0 [INFO] [stderr] Compiling getrandom v0.3.1 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Checking bstr v1.11.3 [INFO] [stderr] Checking unicode-width v0.2.0 [INFO] [stderr] Checking num-modular v0.6.1 [INFO] [stderr] Checking clap_builder v4.5.29 [INFO] [stderr] Checking crossbeam-deque v0.8.6 [INFO] [stderr] Checking num-order v1.2.0 [INFO] [stderr] Checking fs_extra v1.3.0 [INFO] [stderr] Checking console v0.15.10 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking uuid v0.8.2 [INFO] [stderr] Checking globset v0.4.15 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking indicatif v0.17.11 [INFO] [stderr] Checking ignore v0.4.23 [INFO] [stderr] Checking tempfile v3.16.0 [INFO] [stderr] Checking serde_json v1.0.138 [INFO] [stderr] Checking ctrlc v3.4.5 [INFO] [stderr] Compiling darling_core v0.20.10 [INFO] [stderr] Compiling thiserror-impl v2.0.11 [INFO] [stderr] Compiling clap_derive v4.5.28 [INFO] [stderr] Compiling pest v2.7.15 [INFO] [stderr] Compiling darling_macro v0.20.10 [INFO] [stderr] Checking clap v4.5.29 [INFO] [stderr] Compiling darling v0.20.10 [INFO] [stderr] Compiling derive_builder_core v0.20.2 [INFO] [stderr] Compiling pest_meta v2.7.15 [INFO] [stderr] Compiling derive_builder_macro v0.20.2 [INFO] [stderr] Checking derive_builder v0.20.2 [INFO] [stderr] Compiling pest_generator v2.7.15 [INFO] [stderr] Compiling pest_derive v2.7.15 [INFO] [stderr] Checking handlebars v6.3.1 [INFO] [stderr] Checking parabuild v0.3.3 (/opt/rustwide/workdir) [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:194:5 [INFO] [stdout] | [INFO] [stdout] 194 | //! $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ $^ [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/filesystem_utils.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use fs_extra; [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/filesystem_utils.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use ignore; [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: using tabs in doc comments is not recommended [INFO] [stdout] --> src/lib.rs:194:5 [INFO] [stdout] | [INFO] [stdout] 194 | //! $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ $^ [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/filesystem_utils.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use fs_extra; [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/filesystem_utils.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use ignore; [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: redundant closure [INFO] [stdout] --> src/parabuilder.rs:66:59 [INFO] [stdout] | [INFO] [stdout] 66 | let cuda_device_uuids = CUDA_DEVICE_UUIDS.get_or_init(|| get_cuda_mig_device_uuids()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_cuda_mig_device_uuids` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/parabuilder.rs:110:24 [INFO] [stdout] | [INFO] [stdout] 110 | let workspace_id = workspace_path [INFO] [stdout] | ________________________^ [INFO] [stdout] 111 | | .file_name() [INFO] [stdout] 112 | | .unwrap() [INFO] [stdout] 113 | | .to_str() [INFO] [stdout] 114 | | .unwrap() [INFO] [stdout] 115 | | .split('_') [INFO] [stdout] 116 | | .last() [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 116 - .last() [INFO] [stdout] 116 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parabuilder.rs:126:24 [INFO] [stdout] | [INFO] [stdout] 126 | output.current_dir(&workspace_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `workspace_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: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/parabuilder.rs:132:23 [INFO] [stdout] | [INFO] [stdout] 132 | "status": match output.status.code() { [INFO] [stdout] | _______________________^ [INFO] [stdout] 133 | | Some(code) => code, [INFO] [stdout] 134 | | None => -1 [INFO] [stdout] 135 | | }, [INFO] [stdout] | |_____________^ help: replace with: `output.status.code().unwrap_or(-1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/parabuilder.rs:225:14 [INFO] [stdout] | [INFO] [stdout] 225 | .into_iter() [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: length comparison to zero [INFO] [stdout] --> src/parabuilder.rs:239:42 [INFO] [stdout] | [INFO] [stdout] 239 | let default_run_bash_script = if target_files.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!target_files.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 `if` statement can be collapsed [INFO] [stdout] --> src/parabuilder.rs:432:9 [INFO] [stdout] | [INFO] [stdout] 432 | / if !is_command_installed("rsync") { [INFO] [stdout] 433 | | if !self.without_rsync { [INFO] [stdout] 434 | | return Err("rsync is not installed, set `without_rsync` to true to ignore".into()); [INFO] [stdout] 435 | | } [INFO] [stdout] 436 | | } [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] 432 ~ if !is_command_installed("rsync") [INFO] [stdout] 433 ~ && !self.without_rsync { [INFO] [stdout] 434 | return Err("rsync is not installed, set `without_rsync` to true to ignore".into()); [INFO] [stdout] 435 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parabuilder.rs:447:9 [INFO] [stdout] | [INFO] [stdout] 447 | / if self.no_cache { [INFO] [stdout] 448 | | if self.workspaces_path.exists() { [INFO] [stdout] 449 | | std::fs::remove_dir_all(&self.workspaces_path).unwrap(); [INFO] [stdout] 450 | | } [INFO] [stdout] 451 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 447 ~ if self.no_cache [INFO] [stdout] 448 ~ && self.workspaces_path.exists() { [INFO] [stdout] 449 | std::fs::remove_dir_all(&self.workspaces_path).unwrap(); [INFO] [stdout] 450 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::fs::ReadDir` [INFO] [stdout] --> src/parabuilder.rs:610:21 [INFO] [stdout] | [INFO] [stdout] 610 | let datas = std::fs::read_dir(&autosave_dir).unwrap().into_iter().fold( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `std::fs::read_dir(&autosave_dir).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parabuilder.rs:683:26 [INFO] [stdout] | [INFO] [stdout] 683 | pub fn run(&self) -> Result<(JsonValue, Vec, Vec), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parabuilder.rs:690:12 [INFO] [stdout] | [INFO] [stdout] 690 | if !self.data_queue_receiver.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.data_queue_receiver.is_none()` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parabuilder.rs:761:29 [INFO] [stdout] | [INFO] [stdout] 761 | |build_handles: Vec, Vec)>>| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/parabuilder.rs:886:26 [INFO] [stdout] | [INFO] [stdout] 886 | .expect(format!("Failed to create {:?}", template_output_path).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to create {:?}", template_output_path))` [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: function call inside of `expect` [INFO] [stdout] --> src/parabuilder.rs:889:26 [INFO] [stdout] | [INFO] [stdout] 889 | .expect(format!("Failed to render {:?}", template_output_path).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to render {:?}", template_output_path))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parabuilder.rs:971:43 [INFO] [stdout] | [INFO] [stdout] 971 | ... std::fs::copy(&target_path, &to_target_executable_path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `target_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: the borrowed expression implements the required traits [INFO] [stdout] --> src/parabuilder.rs:1059:65 [INFO] [stdout] | [INFO] [stdout] 1059 | std::fs::rename(&to_target_executable_path, &target_path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `target_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parabuilder.rs:1062:43 [INFO] [stdout] | [INFO] [stdout] 1062 | wait_until_file_ready(&target_path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `target_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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parabuilder.rs:1110:10 [INFO] [stdout] | [INFO] [stdout] 1110 | ) -> Result<(JsonValue, Vec, Vec), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parabuilder.rs:66:59 [INFO] [stdout] | [INFO] [stdout] 66 | let cuda_device_uuids = CUDA_DEVICE_UUIDS.get_or_init(|| get_cuda_mig_device_uuids()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_cuda_mig_device_uuids` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/parabuilder.rs:110:24 [INFO] [stdout] | [INFO] [stdout] 110 | let workspace_id = workspace_path [INFO] [stdout] | ________________________^ [INFO] [stdout] 111 | | .file_name() [INFO] [stdout] 112 | | .unwrap() [INFO] [stdout] 113 | | .to_str() [INFO] [stdout] 114 | | .unwrap() [INFO] [stdout] 115 | | .split('_') [INFO] [stdout] 116 | | .last() [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 116 - .last() [INFO] [stdout] 116 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parabuilder.rs:126:24 [INFO] [stdout] | [INFO] [stdout] 126 | output.current_dir(&workspace_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `workspace_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: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/parabuilder.rs:132:23 [INFO] [stdout] | [INFO] [stdout] 132 | "status": match output.status.code() { [INFO] [stdout] | _______________________^ [INFO] [stdout] 133 | | Some(code) => code, [INFO] [stdout] 134 | | None => -1 [INFO] [stdout] 135 | | }, [INFO] [stdout] | |_____________^ help: replace with: `output.status.code().unwrap_or(-1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/parabuilder.rs:225:14 [INFO] [stdout] | [INFO] [stdout] 225 | .into_iter() [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: length comparison to zero [INFO] [stdout] --> src/parabuilder.rs:239:42 [INFO] [stdout] | [INFO] [stdout] 239 | let default_run_bash_script = if target_files.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!target_files.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 `if` statement can be collapsed [INFO] [stdout] --> src/parabuilder.rs:432:9 [INFO] [stdout] | [INFO] [stdout] 432 | / if !is_command_installed("rsync") { [INFO] [stdout] 433 | | if !self.without_rsync { [INFO] [stdout] 434 | | return Err("rsync is not installed, set `without_rsync` to true to ignore".into()); [INFO] [stdout] 435 | | } [INFO] [stdout] 436 | | } [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] 432 ~ if !is_command_installed("rsync") [INFO] [stdout] 433 ~ && !self.without_rsync { [INFO] [stdout] 434 | return Err("rsync is not installed, set `without_rsync` to true to ignore".into()); [INFO] [stdout] 435 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parabuilder.rs:447:9 [INFO] [stdout] | [INFO] [stdout] 447 | / if self.no_cache { [INFO] [stdout] 448 | | if self.workspaces_path.exists() { [INFO] [stdout] 449 | | std::fs::remove_dir_all(&self.workspaces_path).unwrap(); [INFO] [stdout] 450 | | } [INFO] [stdout] 451 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 447 ~ if self.no_cache [INFO] [stdout] 448 ~ && self.workspaces_path.exists() { [INFO] [stdout] 449 | std::fs::remove_dir_all(&self.workspaces_path).unwrap(); [INFO] [stdout] 450 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::fs::ReadDir` [INFO] [stdout] --> src/parabuilder.rs:610:21 [INFO] [stdout] | [INFO] [stdout] 610 | let datas = std::fs::read_dir(&autosave_dir).unwrap().into_iter().fold( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `std::fs::read_dir(&autosave_dir).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parabuilder.rs:683:26 [INFO] [stdout] | [INFO] [stdout] 683 | pub fn run(&self) -> Result<(JsonValue, Vec, Vec), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parabuilder.rs:690:12 [INFO] [stdout] | [INFO] [stdout] 690 | if !self.data_queue_receiver.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.data_queue_receiver.is_none()` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parabuilder.rs:761:29 [INFO] [stdout] | [INFO] [stdout] 761 | |build_handles: Vec, Vec)>>| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/parabuilder.rs:886:26 [INFO] [stdout] | [INFO] [stdout] 886 | .expect(format!("Failed to create {:?}", template_output_path).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to create {:?}", template_output_path))` [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: function call inside of `expect` [INFO] [stdout] --> src/parabuilder.rs:889:26 [INFO] [stdout] | [INFO] [stdout] 889 | .expect(format!("Failed to render {:?}", template_output_path).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to render {:?}", template_output_path))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/parabuilder.rs:971:43 [INFO] [stdout] | [INFO] [stdout] 971 | ... std::fs::copy(&target_path, &to_target_executable_path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `target_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: the borrowed expression implements the required traits [INFO] [stdout] --> src/parabuilder.rs:1059:65 [INFO] [stdout] | [INFO] [stdout] 1059 | std::fs::rename(&to_target_executable_path, &target_path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `target_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parabuilder.rs:1062:43 [INFO] [stdout] | [INFO] [stdout] 1062 | wait_until_file_ready(&target_path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `target_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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parabuilder.rs:1110:10 [INFO] [stdout] | [INFO] [stdout] 1110 | ) -> Result<(JsonValue, Vec, Vec), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> examples/cuda_quick_start.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | let datas = (0..20) [INFO] [stdout] | _________________^ [INFO] [stdout] 10 | | .into_iter() [INFO] [stdout] | |____________________^ help: consider removing `.into_iter()`: `(0..20)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:194:28 [INFO] [stdout] | [INFO] [stdout] 194 | write!(file, "{}", "#!/bin/bash\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] = note: `#[warn(clippy::write_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 194 - write!(file, "{}", "#!/bin/bash\n").unwrap(); [INFO] [stdout] 194 + write!(file, "#!/bin/bash\n").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:425:12 [INFO] [stdout] | [INFO] [stdout] 425 | && run_data.as_array().unwrap().len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!run_data.as_array().unwrap().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: literal with an empty format string [INFO] [stdout] --> src/main.rs:194:28 [INFO] [stdout] | [INFO] [stdout] 194 | write!(file, "{}", "#!/bin/bash\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] = note: `#[warn(clippy::write_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 194 - write!(file, "{}", "#!/bin/bash\n").unwrap(); [INFO] [stdout] 194 + write!(file, "#!/bin/bash\n").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:425:12 [INFO] [stdout] | [INFO] [stdout] 425 | && run_data.as_array().unwrap().len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!run_data.as_array().unwrap().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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 39.87s [INFO] running `Command { std: "docker" "inspect" "fdcf4ddd6b9b911795852179b5df316b4073a0e74b6ef00a503791df2624442c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fdcf4ddd6b9b911795852179b5df316b4073a0e74b6ef00a503791df2624442c", kill_on_drop: false }` [INFO] [stdout] fdcf4ddd6b9b911795852179b5df316b4073a0e74b6ef00a503791df2624442c