[INFO] cloning repository https://github.com/NeroAlfonso/folder-splitter-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/NeroAlfonso/folder-splitter-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FNeroAlfonso%2Ffolder-splitter-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FNeroAlfonso%2Ffolder-splitter-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8b2afd9390f684a330aebe57fea050908cd4b73a [INFO] linting NeroAlfonso/folder-splitter-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FNeroAlfonso%2Ffolder-splitter-rust" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/NeroAlfonso/folder-splitter-rust [INFO] finished tweaking git repo https://github.com/NeroAlfonso/folder-splitter-rust [INFO] tweaked toml for git repo https://github.com/NeroAlfonso/folder-splitter-rust written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/NeroAlfonso/folder-splitter-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/NeroAlfonso/folder-splitter-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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] f31ac5b62cf00827b74fc16ac40252cae8a7ad31c3c3092a418d5b8f7f36b3d1 [INFO] running `Command { std: "docker" "start" "-a" "f31ac5b62cf00827b74fc16ac40252cae8a7ad31c3c3092a418d5b8f7f36b3d1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f31ac5b62cf00827b74fc16ac40252cae8a7ad31c3c3092a418d5b8f7f36b3d1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f31ac5b62cf00827b74fc16ac40252cae8a7ad31c3c3092a418d5b8f7f36b3d1", kill_on_drop: false }` [INFO] [stdout] f31ac5b62cf00827b74fc16ac40252cae8a7ad31c3c3092a418d5b8f7f36b3d1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] d1b56c90054e1fc82399024e67569a3d0f2169bceff3dfa34b036db69839e9b9 [INFO] running `Command { std: "docker" "start" "-a" "d1b56c90054e1fc82399024e67569a3d0f2169bceff3dfa34b036db69839e9b9", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.117 [INFO] [stderr] Compiling proc-macro2 v1.0.36 [INFO] [stderr] Compiling syn v1.0.86 [INFO] [stderr] Compiling bzip2-sys v0.1.11+1.0.8 [INFO] [stderr] Compiling miniz_oxide v0.4.4 [INFO] [stderr] Checking walkdir v2.3.2 [INFO] [stderr] Checking time v0.1.44 [INFO] [stderr] Checking flate2 v1.0.22 [INFO] [stderr] Compiling quote v1.0.15 [INFO] [stderr] Checking bzip2 v0.4.3 [INFO] [stderr] Compiling thiserror-impl v1.0.30 [INFO] [stderr] Checking thiserror v1.0.30 [INFO] [stderr] Checking zip v0.5.13 [INFO] [stderr] Checking folder_splitter_rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | log: log [INFO] [stdout] | ^^^^^^^^ help: replace it with: `log` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:99:36 [INFO] [stdout] | [INFO] [stdout] 99 | return Err(CustomError{msg: msg}); [INFO] [stdout] | ^^^^^^^^ help: replace it with: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:106:40 [INFO] [stdout] | [INFO] [stdout] 106 | return Err(CustomError{msg: msg}); [INFO] [stdout] | ^^^^^^^^ help: replace it with: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around pattern [INFO] [stdout] --> src/main.rs:237:25 [INFO] [stdout] | [INFO] [stdout] 237 | (_) =>{} [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 237 - (_) =>{} [INFO] [stdout] 237 + _ =>{} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | log: log [INFO] [stdout] | ^^^^^^^^ help: replace it with: `log` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:99:36 [INFO] [stdout] | [INFO] [stdout] 99 | return Err(CustomError{msg: msg}); [INFO] [stdout] | ^^^^^^^^ help: replace it with: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:106:40 [INFO] [stdout] | [INFO] [stdout] 106 | return Err(CustomError{msg: msg}); [INFO] [stdout] | ^^^^^^^^ help: replace it with: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around pattern [INFO] [stdout] --> src/main.rs:237:25 [INFO] [stdout] | [INFO] [stdout] 237 | (_) =>{} [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 237 - (_) =>{} [INFO] [stdout] 237 + _ =>{} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | Err(e) => continue [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `res` [INFO] [stdout] --> src/main.rs:150:16 [INFO] [stdout] | [INFO] [stdout] 150 | Ok(res) =>{}, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_res` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | Err(e) => return Err(CustomError{msg: String::from("No se pudo crear el nuevo directorio físico")}) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:284:9 [INFO] [stdout] | [INFO] [stdout] 284 | let mut directories : Directories = Directories{ [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `zipped_dirs` [INFO] [stdout] --> src/main.rs:295:9 [INFO] [stdout] | [INFO] [stdout] 295 | let zipped_dirs : bool = match zip_dirs(¶ms, &directories.current_prefix) [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_zipped_dirs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:50:8 [INFO] [stdout] | [INFO] [stdout] 50 | if !to_dir_content.next().is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `to_dir_content.next().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/main.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | / if log =="true" [INFO] [stdout] 65 | | { [INFO] [stdout] 66 | | true [INFO] [stdout] ... | [INFO] [stdout] 70 | | false [INFO] [stdout] 71 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `log == "true"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | return Ok(directories); [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] 110 - return Ok(directories); [INFO] [stdout] 110 + Ok(directories) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | return Ok(directories); [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] 193 - return Ok(directories); [INFO] [stdout] 193 + Ok(directories) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | dir.size = dir.size + size_file; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dir.size += size_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | dir_counter = dir_counter+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dir_counter += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | aux_current_directory.size = aux_current_directory.size + size_file; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `aux_current_directory.size += size_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:147:40 [INFO] [stdout] | [INFO] [stdout] 147 | let mut new_dir_path : String= String::from(params.to_dir.display().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `params.to_dir.display().to_string()` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | new_dir_path.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `new_dir_path.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | directories.current_prefix = directories.current_prefix +1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `directories.current_prefix += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [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/main.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | / match fs::copy(path.path(), dest_file_path) { [INFO] [stdout] 183 | | Ok(_) => {}, [INFO] [stdout] 184 | | Err(_) => {} [INFO] [stdout] 185 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Ok(_) = fs::copy(path.path(), dest_file_path) {}` [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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:201:5 [INFO] [stdout] | [INFO] [stdout] 201 | return directories; [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] 201 - return directories; [INFO] [stdout] 201 + directories [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:272:5 [INFO] [stdout] | [INFO] [stdout] 272 | return Ok(true); [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] 272 - return Ok(true); [INFO] [stdout] 272 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_owned` [INFO] [stdout] --> src/main.rs:205:28 [INFO] [stdout] | [INFO] [stdout] 205 | let dirs =fs::read_dir(params.to_dir.to_owned()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `¶ms.to_dir` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:232:21 [INFO] [stdout] | [INFO] [stdout] 232 | / match path_component.to_str() [INFO] [stdout] 233 | | { [INFO] [stdout] 234 | | Some(e) =>{ [INFO] [stdout] 235 | | new_path_components.push(e); [INFO] [stdout] 236 | | }, [INFO] [stdout] 237 | | (_) =>{} [INFO] [stdout] 238 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 232 ~ if let Some(e) = path_component.to_str() { [INFO] [stdout] 233 + new_path_components.push(e); [INFO] [stdout] 234 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:240:17 [INFO] [stdout] | [INFO] [stdout] 240 | index_components = index_components+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `index_components += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:258:36 [INFO] [stdout] | [INFO] [stdout] 258 | zip_file.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: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:268:9 [INFO] [stdout] | [INFO] [stdout] 268 | dirs_processed =dirs_processed+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dirs_processed += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:255:17 [INFO] [stdout] | [INFO] [stdout] 255 | zip_file.start_file(sub_dir_path_str, options); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 255 | let _ = zip_file.start_file(sub_dir_path_str, options); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:257:17 [INFO] [stdout] | [INFO] [stdout] 257 | file.read_to_end(&mut buffer); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 257 | let _ = file.read_to_end(&mut buffer); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:258:17 [INFO] [stdout] | [INFO] [stdout] 258 | zip_file.write_all(&*buffer); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 258 | let _ = zip_file.write_all(&*buffer); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:267:9 [INFO] [stdout] | [INFO] [stdout] 267 | fs::remove_dir_all(current_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 267 | let _ = fs::remove_dir_all(current_path); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | Err(e) => continue [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `res` [INFO] [stdout] --> src/main.rs:150:16 [INFO] [stdout] | [INFO] [stdout] 150 | Ok(res) =>{}, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_res` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | Err(e) => return Err(CustomError{msg: String::from("No se pudo crear el nuevo directorio físico")}) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:284:9 [INFO] [stdout] | [INFO] [stdout] 284 | let mut directories : Directories = Directories{ [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `zipped_dirs` [INFO] [stdout] --> src/main.rs:295:9 [INFO] [stdout] | [INFO] [stdout] 295 | let zipped_dirs : bool = match zip_dirs(¶ms, &directories.current_prefix) [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_zipped_dirs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:50:8 [INFO] [stdout] | [INFO] [stdout] 50 | if !to_dir_content.next().is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `to_dir_content.next().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/main.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | / if log =="true" [INFO] [stdout] 65 | | { [INFO] [stdout] 66 | | true [INFO] [stdout] ... | [INFO] [stdout] 70 | | false [INFO] [stdout] 71 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `log == "true"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | return Ok(directories); [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] 110 - return Ok(directories); [INFO] [stdout] 110 + Ok(directories) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | return Ok(directories); [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] 193 - return Ok(directories); [INFO] [stdout] 193 + Ok(directories) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | dir.size = dir.size + size_file; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dir.size += size_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | dir_counter = dir_counter+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dir_counter += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | aux_current_directory.size = aux_current_directory.size + size_file; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `aux_current_directory.size += size_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:147:40 [INFO] [stdout] | [INFO] [stdout] 147 | let mut new_dir_path : String= String::from(params.to_dir.display().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `params.to_dir.display().to_string()` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | new_dir_path.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `new_dir_path.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | directories.current_prefix = directories.current_prefix +1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `directories.current_prefix += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [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/main.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | / match fs::copy(path.path(), dest_file_path) { [INFO] [stdout] 183 | | Ok(_) => {}, [INFO] [stdout] 184 | | Err(_) => {} [INFO] [stdout] 185 | | }; [INFO] [stdout] | |_____________^ help: try: `if let Ok(_) = fs::copy(path.path(), dest_file_path) {}` [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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:201:5 [INFO] [stdout] | [INFO] [stdout] 201 | return directories; [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] 201 - return directories; [INFO] [stdout] 201 + directories [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:272:5 [INFO] [stdout] | [INFO] [stdout] 272 | return Ok(true); [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] 272 - return Ok(true); [INFO] [stdout] 272 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_owned` [INFO] [stdout] --> src/main.rs:205:28 [INFO] [stdout] | [INFO] [stdout] 205 | let dirs =fs::read_dir(params.to_dir.to_owned()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `¶ms.to_dir` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:232:21 [INFO] [stdout] | [INFO] [stdout] 232 | / match path_component.to_str() [INFO] [stdout] 233 | | { [INFO] [stdout] 234 | | Some(e) =>{ [INFO] [stdout] 235 | | new_path_components.push(e); [INFO] [stdout] 236 | | }, [INFO] [stdout] 237 | | (_) =>{} [INFO] [stdout] 238 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 232 ~ if let Some(e) = path_component.to_str() { [INFO] [stdout] 233 + new_path_components.push(e); [INFO] [stdout] 234 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:240:17 [INFO] [stdout] | [INFO] [stdout] 240 | index_components = index_components+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `index_components += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:258:36 [INFO] [stdout] | [INFO] [stdout] 258 | zip_file.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: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:268:9 [INFO] [stdout] | [INFO] [stdout] 268 | dirs_processed =dirs_processed+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dirs_processed += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:255:17 [INFO] [stdout] | [INFO] [stdout] 255 | zip_file.start_file(sub_dir_path_str, options); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 255 | let _ = zip_file.start_file(sub_dir_path_str, options); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:257:17 [INFO] [stdout] | [INFO] [stdout] 257 | file.read_to_end(&mut buffer); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 257 | let _ = file.read_to_end(&mut buffer); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:258:17 [INFO] [stdout] | [INFO] [stdout] 258 | zip_file.write_all(&*buffer); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 258 | let _ = zip_file.write_all(&*buffer); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:267:9 [INFO] [stdout] | [INFO] [stdout] 267 | fs::remove_dir_all(current_path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 267 | let _ = fs::remove_dir_all(current_path); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.87s [INFO] running `Command { std: "docker" "inspect" "d1b56c90054e1fc82399024e67569a3d0f2169bceff3dfa34b036db69839e9b9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d1b56c90054e1fc82399024e67569a3d0f2169bceff3dfa34b036db69839e9b9", kill_on_drop: false }` [INFO] [stdout] d1b56c90054e1fc82399024e67569a3d0f2169bceff3dfa34b036db69839e9b9