[INFO] cloning repository https://github.com/beepyaus/Rust_map_copy [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/beepyaus/Rust_map_copy" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbeepyaus%2FRust_map_copy", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbeepyaus%2FRust_map_copy'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d3663f18d89ccbdc5a30edde517299f6c12d9938 [INFO] linting beepyaus/Rust_map_copy against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbeepyaus%2FRust_map_copy" "/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/beepyaus/Rust_map_copy [INFO] finished tweaking git repo https://github.com/beepyaus/Rust_map_copy [INFO] tweaked toml for git repo https://github.com/beepyaus/Rust_map_copy written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/beepyaus/Rust_map_copy 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/beepyaus/Rust_map_copy 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] Downloading crates ... [INFO] [stderr] Downloaded simplelog v0.11.2 [INFO] [stderr] Downloaded paris v1.5.13 [INFO] [stderr] Downloaded rxml_validation v0.8.1 [INFO] [stderr] Downloaded rxml v0.8.1 [INFO] [stderr] Downloaded minidom v0.15.0 [INFO] [stderr] Downloaded smartstring v0.2.10 [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] c4847d7eed5664319cb2fe8e0d72335df6b237f053170ea201f0bda444366925 [INFO] running `Command { std: "docker" "start" "-a" "c4847d7eed5664319cb2fe8e0d72335df6b237f053170ea201f0bda444366925", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c4847d7eed5664319cb2fe8e0d72335df6b237f053170ea201f0bda444366925", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c4847d7eed5664319cb2fe8e0d72335df6b237f053170ea201f0bda444366925", kill_on_drop: false }` [INFO] [stdout] c4847d7eed5664319cb2fe8e0d72335df6b237f053170ea201f0bda444366925 [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] 374cfb9b704bb8359dc0c15c5a6708577242bbdd549f1f63d89d03dcde8ec6ae [INFO] running `Command { std: "docker" "start" "-a" "374cfb9b704bb8359dc0c15c5a6708577242bbdd549f1f63d89d03dcde8ec6ae", kill_on_drop: false }` [INFO] [stderr] Compiling tokio v1.21.2 [INFO] [stderr] Checking rxml_validation v0.8.1 [INFO] [stderr] Checking iana-time-zone v0.1.53 [INFO] [stderr] Checking paris v1.5.13 [INFO] [stderr] Checking smartstring v0.2.10 [INFO] [stderr] Checking xml-rs v0.8.4 [INFO] [stderr] Checking num-integer v0.1.45 [INFO] [stderr] Checking time v0.1.44 [INFO] [stderr] Checking chrono v0.4.22 [INFO] [stderr] Checking simplelog v0.11.2 [INFO] [stderr] Checking rxml v0.8.1 [INFO] [stderr] Checking minidom v0.15.0 [INFO] [stderr] Checking project_tree v0.1.30 (/opt/rustwide/workdir) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/mapcopy.rs:39:21 [INFO] [stdout] | [INFO] [stdout] 39 | const TEST_PREFIX: &'static str = "/home/troy/Downloads/mapcopy_test"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/mapcopy.rs:147:11 [INFO] [stdout] | [INFO] [stdout] 147 | while i <= args.len() -1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change it to: `i < args.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/mapcopy.rs:151:22 [INFO] [stdout] | [INFO] [stdout] 151 | let val = if i+1 <= args.len() -1 { &args[i+1] } else { "" }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change it to: `i < args.len() - 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/mapcopy.rs:39:21 [INFO] [stdout] | [INFO] [stdout] 39 | const TEST_PREFIX: &'static str = "/home/troy/Downloads/mapcopy_test"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/mapcopy.rs:147:11 [INFO] [stdout] | [INFO] [stdout] 147 | while i <= args.len() -1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change it to: `i < args.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/mapcopy.rs:151:22 [INFO] [stdout] | [INFO] [stdout] 151 | let val = if i+1 <= args.len() -1 { &args[i+1] } else { "" }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change it to: `i < args.len() - 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/mapcopy.rs:126:12 [INFO] [stdout] | [INFO] [stdout] 126 | pub fn run<'a>(args: &'a Vec ) -> Result {//{{{ [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 126 - pub fn run<'a>(args: &'a Vec ) -> Result {//{{{ [INFO] [stdout] 126 + pub fn run(args: &Vec ) -> Result {//{{{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ________^ [INFO] [stdout] 255 | | || g.swap_dir == "" [INFO] [stdout] 256 | | || g.target == "" [INFO] [stdout] 257 | | || g.build_dir == "" [INFO] [stdout] ... | [INFO] [stdout] 260 | | || g.logfile_dir == "" [INFO] [stdout] 261 | | || g.source_dir == "" [INFO] [stdout] | |_____________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 259 - || g.backup_dir == "" [INFO] [stdout] 260 - || g.logfile_dir == "" [INFO] [stdout] 261 - || g.source_dir == "" [INFO] [stdout] 254 + if !(g.target != "" && g.swap_dir != "" && g.build_dir != "" && g.build_name != "" && g.backup_dir != "" && g.logfile_dir != "" && g.source_dir != "") [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 259 - || g.backup_dir == "" [INFO] [stdout] 260 - || g.logfile_dir == "" [INFO] [stdout] 261 - || g.source_dir == "" [INFO] [stdout] 254 + if g.target == "" || g.swap_dir == "" || g.build_dir == "" || g.build_name == "" || g.backup_dir == "" || g.logfile_dir == "" || g.source_dir == "" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ________^ [INFO] [stdout] 255 | | || g.swap_dir == "" [INFO] [stdout] 256 | | || g.target == "" [INFO] [stdout] 257 | | || g.build_dir == "" [INFO] [stdout] 258 | | || g.build_name == "" [INFO] [stdout] 259 | | || g.backup_dir == "" [INFO] [stdout] 260 | | || g.logfile_dir == "" [INFO] [stdout] | |______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 259 - || g.backup_dir == "" [INFO] [stdout] 260 - || g.logfile_dir == "" [INFO] [stdout] 254 + if !(g.target != "" && g.swap_dir != "" && g.build_dir != "" && g.build_name != "" && g.backup_dir != "" && g.logfile_dir != "") [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 259 - || g.backup_dir == "" [INFO] [stdout] 260 - || g.logfile_dir == "" [INFO] [stdout] 254 + if g.target == "" || g.swap_dir == "" || g.build_dir == "" || g.build_name == "" || g.backup_dir == "" || g.logfile_dir == "" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ________^ [INFO] [stdout] 255 | | || g.swap_dir == "" [INFO] [stdout] 256 | | || g.target == "" [INFO] [stdout] 257 | | || g.build_dir == "" [INFO] [stdout] 258 | | || g.build_name == "" [INFO] [stdout] 259 | | || g.backup_dir == "" [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 259 - || g.backup_dir == "" [INFO] [stdout] 254 + if !(g.target != "" && g.swap_dir != "" && g.build_dir != "" && g.build_name != "" && g.backup_dir != "") [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 259 - || g.backup_dir == "" [INFO] [stdout] 254 + if g.target == "" || g.swap_dir == "" || g.build_dir == "" || g.build_name == "" || g.backup_dir == "" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ________^ [INFO] [stdout] 255 | | || g.swap_dir == "" [INFO] [stdout] 256 | | || g.target == "" [INFO] [stdout] 257 | | || g.build_dir == "" [INFO] [stdout] 258 | | || g.build_name == "" [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 254 + if !(g.target != "" && g.swap_dir != "" && g.build_dir != "" && g.build_name != "") [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 254 + if g.target == "" || g.swap_dir == "" || g.build_dir == "" || g.build_name == "" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ________^ [INFO] [stdout] 255 | | || g.swap_dir == "" [INFO] [stdout] 256 | | || g.target == "" [INFO] [stdout] 257 | | || g.build_dir == "" [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 254 + if !(g.target != "" && g.swap_dir != "" && g.build_dir != "") [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 254 + if g.target == "" || g.swap_dir == "" || g.build_dir == "" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ________^ [INFO] [stdout] 255 | | || g.swap_dir == "" [INFO] [stdout] 256 | | || g.target == "" [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 254 + if !(g.target != "" && g.swap_dir != "") [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 254 + if g.target == "" || g.swap_dir == "" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:200:62 [INFO] [stdout] | [INFO] [stdout] 199 | if result.is_err(){ [INFO] [stdout] | ------------------ help: try: `if let Err() = result` [INFO] [stdout] 200 | let err = format!("run: get_base call failure: {} ", result.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:297:5 [INFO] [stdout] | [INFO] [stdout] 297 | 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 297 - return Ok(true); [INFO] [stdout] 297 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mapcopy.rs:126:22 [INFO] [stdout] | [INFO] [stdout] 126 | pub fn run<'a>(args: &'a Vec ) -> 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] 126 - pub fn run<'a>(args: &'a Vec ) -> Result {//{{{ [INFO] [stdout] 126 + pub fn run<'a>(args: &'a [String] ) -> Result {//{{{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapcopy.rs:158:53 [INFO] [stdout] | [INFO] [stdout] 158 | "-l" | "--loglevel" => set_logger_level(&val), [INFO] [stdout] | ^^^^ help: change this to: `val` [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: manual implementation of an assign operation [INFO] [stdout] --> src/mapcopy.rs:161:9 [INFO] [stdout] | [INFO] [stdout] 161 | i = i+1; [INFO] [stdout] | ^^^^^^^ help: replace it with: `i += 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] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:165:8 [INFO] [stdout] | [INFO] [stdout] 165 | if g.mode == "" { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.mode.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: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:166:19 [INFO] [stdout] | [INFO] [stdout] 166 | let err = format!("ERROR: No 'mode' set!"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"ERROR: No 'mode' set!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapcopy.rs:214:20 [INFO] [stdout] | [INFO] [stdout] 214 | g.source_dir = &g.build_dir; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `g.build_dir` [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: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.target.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:255:12 [INFO] [stdout] | [INFO] [stdout] 255 | || g.swap_dir == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.swap_dir.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:256:12 [INFO] [stdout] | [INFO] [stdout] 256 | || g.target == "" [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.target.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:257:12 [INFO] [stdout] | [INFO] [stdout] 257 | || g.build_dir == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.build_dir.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:258:12 [INFO] [stdout] | [INFO] [stdout] 258 | || g.build_name == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.build_name.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:259:12 [INFO] [stdout] | [INFO] [stdout] 259 | || g.backup_dir == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.backup_dir.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:260:12 [INFO] [stdout] | [INFO] [stdout] 260 | || g.logfile_dir == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.logfile_dir.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:261:12 [INFO] [stdout] | [INFO] [stdout] 261 | || g.source_dir == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.source_dir.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:262:12 [INFO] [stdout] | [INFO] [stdout] 262 | || g.config_dir == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.config_dir.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:263:12 [INFO] [stdout] | [INFO] [stdout] 263 | || web_owner == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `web_owner.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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:264:19 [INFO] [stdout] | [INFO] [stdout] 264 | let err = format!( "ERROR: Some get_base fields are empty. "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"ERROR: Some get_base fields are empty. ".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/mapcopy.rs:305:8 [INFO] [stdout] | [INFO] [stdout] 305 | if parts.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `parts.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/mapcopy.rs:309:32 [INFO] [stdout] | [INFO] [stdout] 309 | let mut cmd = Command::new(&parts[0]); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `parts[0]` [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: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:372:5 [INFO] [stdout] | [INFO] [stdout] 372 | return 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] 372 - return true [INFO] [stdout] 372 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/mapcopy.rs:126:12 [INFO] [stdout] | [INFO] [stdout] 126 | pub fn run<'a>(args: &'a Vec ) -> Result {//{{{ [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 126 - pub fn run<'a>(args: &'a Vec ) -> Result {//{{{ [INFO] [stdout] 126 + pub fn run(args: &Vec ) -> Result {//{{{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ________^ [INFO] [stdout] 255 | | || g.swap_dir == "" [INFO] [stdout] 256 | | || g.target == "" [INFO] [stdout] 257 | | || g.build_dir == "" [INFO] [stdout] ... | [INFO] [stdout] 260 | | || g.logfile_dir == "" [INFO] [stdout] 261 | | || g.source_dir == "" [INFO] [stdout] | |_____________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 259 - || g.backup_dir == "" [INFO] [stdout] 260 - || g.logfile_dir == "" [INFO] [stdout] 261 - || g.source_dir == "" [INFO] [stdout] 254 + if !(g.target != "" && g.swap_dir != "" && g.build_dir != "" && g.build_name != "" && g.backup_dir != "" && g.logfile_dir != "" && g.source_dir != "") [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 259 - || g.backup_dir == "" [INFO] [stdout] 260 - || g.logfile_dir == "" [INFO] [stdout] 261 - || g.source_dir == "" [INFO] [stdout] 254 + if g.target == "" || g.swap_dir == "" || g.build_dir == "" || g.build_name == "" || g.backup_dir == "" || g.logfile_dir == "" || g.source_dir == "" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/mapcopy.rs:415:13 [INFO] [stdout] | [INFO] [stdout] 415 | fn get_base<'a>(self_path : &str ) -> Result,String> {//{{{ [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ________^ [INFO] [stdout] 255 | | || g.swap_dir == "" [INFO] [stdout] 256 | | || g.target == "" [INFO] [stdout] 257 | | || g.build_dir == "" [INFO] [stdout] 258 | | || g.build_name == "" [INFO] [stdout] 259 | | || g.backup_dir == "" [INFO] [stdout] 260 | | || g.logfile_dir == "" [INFO] [stdout] | |______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 259 - || g.backup_dir == "" [INFO] [stdout] 260 - || g.logfile_dir == "" [INFO] [stdout] 254 + if !(g.target != "" && g.swap_dir != "" && g.build_dir != "" && g.build_name != "" && g.backup_dir != "" && g.logfile_dir != "") [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 259 - || g.backup_dir == "" [INFO] [stdout] 260 - || g.logfile_dir == "" [INFO] [stdout] 254 + if g.target == "" || g.swap_dir == "" || g.build_dir == "" || g.build_name == "" || g.backup_dir == "" || g.logfile_dir == "" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/mapcopy.rs:423:8 [INFO] [stdout] | [INFO] [stdout] 423 | if Path::new(cmd).exists() == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!Path::new(cmd).exists()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ________^ [INFO] [stdout] 255 | | || g.swap_dir == "" [INFO] [stdout] 256 | | || g.target == "" [INFO] [stdout] 257 | | || g.build_dir == "" [INFO] [stdout] 258 | | || g.build_name == "" [INFO] [stdout] 259 | | || g.backup_dir == "" [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 259 - || g.backup_dir == "" [INFO] [stdout] 254 + if !(g.target != "" && g.swap_dir != "" && g.build_dir != "" && g.build_name != "" && g.backup_dir != "") [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 259 - || g.backup_dir == "" [INFO] [stdout] 254 + if g.target == "" || g.swap_dir == "" || g.build_dir == "" || g.build_name == "" || g.backup_dir == "" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:424:19 [INFO] [stdout] | [INFO] [stdout] 424 | let err = format!("get_base: ERROR: 'base_setup.sh' files does not exist."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"get_base: ERROR: 'base_setup.sh' files does not exist.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ________^ [INFO] [stdout] 255 | | || g.swap_dir == "" [INFO] [stdout] 256 | | || g.target == "" [INFO] [stdout] 257 | | || g.build_dir == "" [INFO] [stdout] 258 | | || g.build_name == "" [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 254 + if !(g.target != "" && g.swap_dir != "" && g.build_dir != "" && g.build_name != "") [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 258 - || g.build_name == "" [INFO] [stdout] 254 + if g.target == "" || g.swap_dir == "" || g.build_dir == "" || g.build_name == "" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ________^ [INFO] [stdout] 255 | | || g.swap_dir == "" [INFO] [stdout] 256 | | || g.target == "" [INFO] [stdout] 257 | | || g.build_dir == "" [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 254 + if !(g.target != "" && g.swap_dir != "" && g.build_dir != "") [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 257 - || g.build_dir == "" [INFO] [stdout] 254 + if g.target == "" || g.swap_dir == "" || g.build_dir == "" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ________^ [INFO] [stdout] 255 | | || g.swap_dir == "" [INFO] [stdout] 256 | | || g.target == "" [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 254 + if !(g.target != "" && g.swap_dir != "") [INFO] [stdout] | [INFO] [stdout] 254 - if g.target == "" [INFO] [stdout] 255 - || g.swap_dir == "" [INFO] [stdout] 256 - || g.target == "" [INFO] [stdout] 254 + if g.target == "" || g.swap_dir == "" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:200:62 [INFO] [stdout] | [INFO] [stdout] 199 | if result.is_err(){ [INFO] [stdout] | ------------------ help: try: `if let Err() = result` [INFO] [stdout] 200 | let err = format!("run: get_base call failure: {} ", result.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:297:5 [INFO] [stdout] | [INFO] [stdout] 297 | 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 297 - return Ok(true); [INFO] [stdout] 297 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mapcopy.rs:126:22 [INFO] [stdout] | [INFO] [stdout] 126 | pub fn run<'a>(args: &'a Vec ) -> 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] 126 - pub fn run<'a>(args: &'a Vec ) -> Result {//{{{ [INFO] [stdout] 126 + pub fn run<'a>(args: &'a [String] ) -> Result {//{{{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapcopy.rs:438:36 [INFO] [stdout] | [INFO] [stdout] 438 | let caps = re.captures(&line).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapcopy.rs:158:53 [INFO] [stdout] | [INFO] [stdout] 158 | "-l" | "--loglevel" => set_logger_level(&val), [INFO] [stdout] | ^^^^ help: change this to: `val` [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: manual implementation of an assign operation [INFO] [stdout] --> src/mapcopy.rs:161:9 [INFO] [stdout] | [INFO] [stdout] 161 | i = i+1; [INFO] [stdout] | ^^^^^^^ help: replace it with: `i += 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] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:165:8 [INFO] [stdout] | [INFO] [stdout] 165 | if g.mode == "" { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.mode.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: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:166:19 [INFO] [stdout] | [INFO] [stdout] 166 | let err = format!("ERROR: No 'mode' set!"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"ERROR: No 'mode' set!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapcopy.rs:214:20 [INFO] [stdout] | [INFO] [stdout] 214 | g.source_dir = &g.build_dir; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `g.build_dir` [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: called `unwrap_err` on `result` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:552:97 [INFO] [stdout] | [INFO] [stdout] 551 | if result.is_err() { [INFO] [stdout] | ------------------ help: try: `if let Err() = result` [INFO] [stdout] 552 | let err = format!("scan_tree: level: {} (recursive result): '{}'" ,file_level, result.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/mapcopy.rs:504:33 [INFO] [stdout] | [INFO] [stdout] 504 | ... parent_default_file_mode.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `parent_default_file_mode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/mapcopy.rs:530:44 [INFO] [stdout] | [INFO] [stdout] 530 | default_file_mode: default_file_mode.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `default_file_mode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapcopy.rs:545:29 [INFO] [stdout] | [INFO] [stdout] 545 | ... &node, [INFO] [stdout] | ^^^^^ help: change this to: `node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/mapcopy.rs:549:29 [INFO] [stdout] | [INFO] [stdout] 549 | ... default_file_mode.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `default_file_mode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:254:8 [INFO] [stdout] | [INFO] [stdout] 254 | if g.target == "" [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.target.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:255:12 [INFO] [stdout] | [INFO] [stdout] 255 | || g.swap_dir == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.swap_dir.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:256:12 [INFO] [stdout] | [INFO] [stdout] 256 | || g.target == "" [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.target.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:257:12 [INFO] [stdout] | [INFO] [stdout] 257 | || g.build_dir == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.build_dir.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/mapcopy.rs:573:36 [INFO] [stdout] | [INFO] [stdout] 573 | default_file_mode: default_file_mode.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `default_file_mode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:258:12 [INFO] [stdout] | [INFO] [stdout] 258 | || g.build_name == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.build_name.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:259:12 [INFO] [stdout] | [INFO] [stdout] 259 | || g.backup_dir == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.backup_dir.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:260:12 [INFO] [stdout] | [INFO] [stdout] 260 | || g.logfile_dir == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.logfile_dir.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:261:12 [INFO] [stdout] | [INFO] [stdout] 261 | || g.source_dir == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.source_dir.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:262:12 [INFO] [stdout] | [INFO] [stdout] 262 | || g.config_dir == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.config_dir.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] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:263:12 [INFO] [stdout] | [INFO] [stdout] 263 | || web_owner == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `web_owner.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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:264:19 [INFO] [stdout] | [INFO] [stdout] 264 | let err = format!( "ERROR: Some get_base fields are empty. "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"ERROR: Some get_base fields are empty. ".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:671:5 [INFO] [stdout] | [INFO] [stdout] 671 | 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] 671 - return Ok(true); [INFO] [stdout] 671 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/mapcopy.rs:305:8 [INFO] [stdout] | [INFO] [stdout] 305 | if parts.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `parts.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/mapcopy.rs:309:32 [INFO] [stdout] | [INFO] [stdout] 309 | let mut cmd = Command::new(&parts[0]); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `parts[0]` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/mapcopy.rs:609:8 [INFO] [stdout] | [INFO] [stdout] 609 | if Path::new(String::as_str(&source)).exists() == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!Path::new(String::as_str(&source)).exists()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:372:5 [INFO] [stdout] | [INFO] [stdout] 372 | return 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] 372 - return true [INFO] [stdout] 372 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/mapcopy.rs:624:12 [INFO] [stdout] | [INFO] [stdout] 624 | if ok == false { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `!ok` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/mapcopy.rs:664:8 [INFO] [stdout] | [INFO] [stdout] 664 | if ok == false { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `!ok` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:685:73 [INFO] [stdout] | [INFO] [stdout] 684 | if result.is_err() { [INFO] [stdout] | ------------------ help: try: `if let Err() = result` [INFO] [stdout] 685 | let err = format!("scan_source: From scan_source_dir call: {}", result.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `ret` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:692:65 [INFO] [stdout] | [INFO] [stdout] 691 | if ret.is_err(){ [INFO] [stdout] | --------------- help: try: `if let Err() = ret` [INFO] [stdout] 692 | let err = format!("scan_source: From show_prelim: {}" , ret.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:699:5 [INFO] [stdout] | [INFO] [stdout] 699 | 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] 699 - return Ok(true); [INFO] [stdout] 699 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/mapcopy.rs:415:13 [INFO] [stdout] | [INFO] [stdout] 415 | fn get_base<'a>(self_path : &str ) -> Result,String> {//{{{ [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/mapcopy.rs:423:8 [INFO] [stdout] | [INFO] [stdout] 423 | if Path::new(cmd).exists() == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!Path::new(cmd).exists()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:424:19 [INFO] [stdout] | [INFO] [stdout] 424 | let err = format!("get_base: ERROR: 'base_setup.sh' files does not exist."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"get_base: ERROR: 'base_setup.sh' files does not exist.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapcopy.rs:438:36 [INFO] [stdout] | [INFO] [stdout] 438 | let caps = re.captures(&line).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `line` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/mapcopy.rs:714:9 [INFO] [stdout] | [INFO] [stdout] 713 | let tmp = &key_path[0..last_dir_pos]; [INFO] [stdout] | ------------------------------------- unnecessary `let` binding [INFO] [stdout] 714 | tmp [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 713 ~ [INFO] [stdout] 714 ~ &key_path[0..last_dir_pos] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:787:8 [INFO] [stdout] | [INFO] [stdout] 787 | if !res.is_ok(){ [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:810:27 [INFO] [stdout] | [INFO] [stdout] 809 | if result.is_err(){ [INFO] [stdout] | ------------------ help: try: `if let Err() = result` [INFO] [stdout] 810 | let err = result.unwrap_err(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:831:65 [INFO] [stdout] | [INFO] [stdout] 830 | if result.is_err() { [INFO] [stdout] | ------------------ help: try: `if let Err() = result` [INFO] [stdout] 831 | let err = format!("map_copy: scan_source error: '{}' ", result.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `ret` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:839:75 [INFO] [stdout] | [INFO] [stdout] 838 | if ret.is_err() { [INFO] [stdout] | --------------- help: try: `if let Err() = ret` [INFO] [stdout] 839 | let err = format!("map_copy: ERROR from copy_source_files = {} ", ret.unwrap_err() ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:846:5 [INFO] [stdout] | [INFO] [stdout] 846 | 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] 846 - return Ok(true); [INFO] [stdout] 846 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:552:97 [INFO] [stdout] | [INFO] [stdout] 551 | if result.is_err() { [INFO] [stdout] | ------------------ help: try: `if let Err() = result` [INFO] [stdout] 552 | let err = format!("scan_tree: level: {} (recursive result): '{}'" ,file_level, result.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:762:18 [INFO] [stdout] | [INFO] [stdout] 762 | let err = format!( "map_copy: 'path_dir' parameter not found on filesystem.\n [INFO] [stdout] | __________________^ [INFO] [stdout] 763 | | NOT performing map_copy as a precaution."); [INFO] [stdout] | |____________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 762 ~ let err = "map_copy: 'path_dir' parameter not found on filesystem.\n [INFO] [stdout] 763 ~ NOT performing map_copy as a precaution.".to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/mapcopy.rs:504:33 [INFO] [stdout] | [INFO] [stdout] 504 | ... parent_default_file_mode.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `parent_default_file_mode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:802:27 [INFO] [stdout] | [INFO] [stdout] 802 | let err = format!("map_copy: directory element did NOT have name attribute!"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"map_copy: directory element did NOT have name attribute!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/mapcopy.rs:530:44 [INFO] [stdout] | [INFO] [stdout] 530 | default_file_mode: default_file_mode.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `default_file_mode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapcopy.rs:545:29 [INFO] [stdout] | [INFO] [stdout] 545 | ... &node, [INFO] [stdout] | ^^^^^ help: change this to: `node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/mapcopy.rs:549:29 [INFO] [stdout] | [INFO] [stdout] 549 | ... default_file_mode.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `default_file_mode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/mapcopy.rs:573:36 [INFO] [stdout] | [INFO] [stdout] 573 | default_file_mode: default_file_mode.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `default_file_mode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:671:5 [INFO] [stdout] | [INFO] [stdout] 671 | 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] 671 - return Ok(true); [INFO] [stdout] 671 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/mapcopy.rs:609:8 [INFO] [stdout] | [INFO] [stdout] 609 | if Path::new(String::as_str(&source)).exists() == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!Path::new(String::as_str(&source)).exists()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/mapcopy.rs:624:12 [INFO] [stdout] | [INFO] [stdout] 624 | if ok == false { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `!ok` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/mapcopy.rs:919:5 [INFO] [stdout] | [INFO] [stdout] 919 | final_source_dir.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `final_source_dir.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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/mapcopy.rs:664:8 [INFO] [stdout] | [INFO] [stdout] 664 | if ok == false { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `!ok` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:685:73 [INFO] [stdout] | [INFO] [stdout] 684 | if result.is_err() { [INFO] [stdout] | ------------------ help: try: `if let Err() = result` [INFO] [stdout] 685 | let err = format!("scan_source: From scan_source_dir call: {}", result.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `ret` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:692:65 [INFO] [stdout] | [INFO] [stdout] 691 | if ret.is_err(){ [INFO] [stdout] | --------------- help: try: `if let Err() = ret` [INFO] [stdout] 692 | let err = format!("scan_source: From show_prelim: {}" , ret.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:699:5 [INFO] [stdout] | [INFO] [stdout] 699 | 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] 699 - return Ok(true); [INFO] [stdout] 699 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:1062:12 [INFO] [stdout] | [INFO] [stdout] 1062 | if !res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `result` after checking its variant with `is_ok` [INFO] [stdout] --> src/mapcopy.rs:1011:41 [INFO] [stdout] | [INFO] [stdout] 1010 | if result.is_ok() { [INFO] [stdout] | ----------------- help: try: `if let Ok() = result` [INFO] [stdout] 1011 | let (perms, last_dir) = result.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_ok` [INFO] [stdout] --> src/mapcopy.rs:1027:27 [INFO] [stdout] | [INFO] [stdout] 1010 | if result.is_ok() { [INFO] [stdout] | ----------------- help: try: `if let Err() = result` [INFO] [stdout] ... [INFO] [stdout] 1027 | let err = result.unwrap_err(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `ret` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:1071:35 [INFO] [stdout] | [INFO] [stdout] 1070 | if ret.is_err(){ [INFO] [stdout] | --------------- help: try: `if let Err() = ret` [INFO] [stdout] 1071 | let str_err = ret.unwrap_err(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:1090:5 [INFO] [stdout] | [INFO] [stdout] 1090 | 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] 1090 - return Ok(true); [INFO] [stdout] 1090 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/mapcopy.rs:714:9 [INFO] [stdout] | [INFO] [stdout] 713 | let tmp = &key_path[0..last_dir_pos]; [INFO] [stdout] | ------------------------------------- unnecessary `let` binding [INFO] [stdout] 714 | tmp [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 713 ~ [INFO] [stdout] 714 ~ &key_path[0..last_dir_pos] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/mapcopy.rs:999:29 [INFO] [stdout] | [INFO] [stdout] 999 | tmp.file_mode = g.file_map[key].file_mode.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.file_map[key].file_mode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:787:8 [INFO] [stdout] | [INFO] [stdout] 787 | if !res.is_ok(){ [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:810:27 [INFO] [stdout] | [INFO] [stdout] 809 | if result.is_err(){ [INFO] [stdout] | ------------------ help: try: `if let Err() = result` [INFO] [stdout] 810 | let err = result.unwrap_err(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:831:65 [INFO] [stdout] | [INFO] [stdout] 830 | if result.is_err() { [INFO] [stdout] | ------------------ help: try: `if let Err() = result` [INFO] [stdout] 831 | let err = format!("map_copy: scan_source error: '{}' ", result.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `ret` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:839:75 [INFO] [stdout] | [INFO] [stdout] 838 | if ret.is_err() { [INFO] [stdout] | --------------- help: try: `if let Err() = ret` [INFO] [stdout] 839 | let err = format!("map_copy: ERROR from copy_source_files = {} ", ret.unwrap_err() ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:846:5 [INFO] [stdout] | [INFO] [stdout] 846 | 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] 846 - return Ok(true); [INFO] [stdout] 846 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:762:18 [INFO] [stdout] | [INFO] [stdout] 762 | let err = format!( "map_copy: 'path_dir' parameter not found on filesystem.\n [INFO] [stdout] | __________________^ [INFO] [stdout] 763 | | NOT performing map_copy as a precaution."); [INFO] [stdout] | |____________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 762 ~ let err = "map_copy: 'path_dir' parameter not found on filesystem.\n [INFO] [stdout] 763 ~ NOT performing map_copy as a precaution.".to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapcopy.rs:1009:46 [INFO] [stdout] | [INFO] [stdout] 1009 | let result = get_parent_perms(g, &key); [INFO] [stdout] | ^^^^ help: change this to: `key` [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: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:1019:34 [INFO] [stdout] | [INFO] [stdout] 1019 | let result = format!("show_prelim: ERROR : default_file_mode was zero ! "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"show_prelim: ERROR : default_file_mode was zero ! ".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:802:27 [INFO] [stdout] | [INFO] [stdout] 802 | let err = format!("map_copy: directory element did NOT have name attribute!"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"map_copy: directory element did NOT have name attribute!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:1078:55 [INFO] [stdout] | [INFO] [stdout] 1078 | } else if &buffer == "N" || &buffer == "n" || &buffer == "" { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `buffer.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] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `parsed` after checking its variant with `is_ok` [INFO] [stdout] --> src/mapcopy.rs:1120:26 [INFO] [stdout] | [INFO] [stdout] 1119 | if parsed.is_ok(){ [INFO] [stdout] | ----------------- help: try: `if let Ok() = parsed` [INFO] [stdout] 1120 | let result = parsed.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:1131:5 [INFO] [stdout] | [INFO] [stdout] 1131 | return 0; [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] 1131 - return 0; [INFO] [stdout] 1131 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:1101:8 [INFO] [stdout] | [INFO] [stdout] 1101 | if uri == "" { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `uri.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] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `str_file_name` after checking its variant with `is_some` [INFO] [stdout] --> src/mapcopy.rs:1215:60 [INFO] [stdout] | [INFO] [stdout] 1214 | if str_file_name.is_some(){ [INFO] [stdout] | -------------------------- help: try: `if let Some() = str_file_name` [INFO] [stdout] 1215 | this_file_mode = get_mode(&g.platform, str_file_name.unwrap() ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `str_file_name` after checking its variant with `is_some` [INFO] [stdout] --> src/mapcopy.rs:1217:98 [INFO] [stdout] | [INFO] [stdout] 1214 | if str_file_name.is_some(){ [INFO] [stdout] | -------------------------- help: try: `if let Some() = str_file_name` [INFO] [stdout] ... [INFO] [stdout] 1217 | let err = format!("scan_source_dir: file name '{}' mode returned zero.", str_file_name.unwrap( ) ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `res` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:1244:98 [INFO] [stdout] | [INFO] [stdout] 1243 | if res.is_err(){ [INFO] [stdout] | --------------- help: try: `if let Err() = res` [INFO] [stdout] 1244 | let err = format!("scan_source_dir: ERROR: scan_source_dir raised err: {} ", res.unwrap_err() ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/mapcopy.rs:1181:13 [INFO] [stdout] | [INFO] [stdout] 1181 | let str_this_dir : String ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `str_this_dir` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 1181 ~ [INFO] [stdout] 1182 ~ let str_this_dir : String = if res_this_dir.is_ok() { [INFO] [stdout] 1183 ~ res_this_dir.as_ref().unwrap().to_string() [INFO] [stdout] 1184 | }else { [INFO] [stdout] ... [INFO] [stdout] 1188 | return Err(err); [INFO] [stdout] 1189 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:1185:26 [INFO] [stdout] | [INFO] [stdout] 1185 | let err = format!("scan_source_dir: could not convert file_name() into String " ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"scan_source_dir: could not convert file_name() into String ".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/mapcopy.rs:919:5 [INFO] [stdout] | [INFO] [stdout] 919 | final_source_dir.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `final_source_dir.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: this boolean expression can be simplified [INFO] [stdout] --> src/mapcopy.rs:1062:12 [INFO] [stdout] | [INFO] [stdout] 1062 | if !res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `result` after checking its variant with `is_ok` [INFO] [stdout] --> src/mapcopy.rs:1011:41 [INFO] [stdout] | [INFO] [stdout] 1010 | if result.is_ok() { [INFO] [stdout] | ----------------- help: try: `if let Ok() = result` [INFO] [stdout] 1011 | let (perms, last_dir) = result.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_ok` [INFO] [stdout] --> src/mapcopy.rs:1027:27 [INFO] [stdout] | [INFO] [stdout] 1010 | if result.is_ok() { [INFO] [stdout] | ----------------- help: try: `if let Err() = result` [INFO] [stdout] ... [INFO] [stdout] 1027 | let err = result.unwrap_err(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `ret` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:1071:35 [INFO] [stdout] | [INFO] [stdout] 1070 | if ret.is_err(){ [INFO] [stdout] | --------------- help: try: `if let Err() = ret` [INFO] [stdout] 1071 | let str_err = ret.unwrap_err(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:1090:5 [INFO] [stdout] | [INFO] [stdout] 1090 | 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] 1090 - return Ok(true); [INFO] [stdout] 1090 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/mapcopy.rs:999:29 [INFO] [stdout] | [INFO] [stdout] 999 | tmp.file_mode = g.file_map[key].file_mode.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.file_map[key].file_mode` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_ok` [INFO] [stdout] --> src/main.rs:17:19 [INFO] [stdout] | [INFO] [stdout] 14 | if result.is_ok() { [INFO] [stdout] | ----------------- help: try: `if let Err() = result` [INFO] [stdout] ... [INFO] [stdout] 17 | let err = result.unwrap_err(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapcopy.rs:1009:46 [INFO] [stdout] | [INFO] [stdout] 1009 | let result = get_parent_perms(g, &key); [INFO] [stdout] | ^^^^ help: change this to: `key` [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: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:1019:34 [INFO] [stdout] | [INFO] [stdout] 1019 | let result = format!("show_prelim: ERROR : default_file_mode was zero ! "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"show_prelim: ERROR : default_file_mode was zero ! ".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:1078:55 [INFO] [stdout] | [INFO] [stdout] 1078 | } else if &buffer == "N" || &buffer == "n" || &buffer == "" { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `buffer.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] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `parsed` after checking its variant with `is_ok` [INFO] [stdout] --> src/mapcopy.rs:1120:26 [INFO] [stdout] | [INFO] [stdout] 1119 | if parsed.is_ok(){ [INFO] [stdout] | ----------------- help: try: `if let Ok() = parsed` [INFO] [stdout] 1120 | let result = parsed.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcopy.rs:1131:5 [INFO] [stdout] | [INFO] [stdout] 1131 | return 0; [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] 1131 - return 0; [INFO] [stdout] 1131 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/mapcopy.rs:1101:8 [INFO] [stdout] | [INFO] [stdout] 1101 | if uri == "" { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `uri.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] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `str_file_name` after checking its variant with `is_some` [INFO] [stdout] --> src/mapcopy.rs:1215:60 [INFO] [stdout] | [INFO] [stdout] 1214 | if str_file_name.is_some(){ [INFO] [stdout] | -------------------------- help: try: `if let Some() = str_file_name` [INFO] [stdout] 1215 | this_file_mode = get_mode(&g.platform, str_file_name.unwrap() ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `str_file_name` after checking its variant with `is_some` [INFO] [stdout] --> src/mapcopy.rs:1217:98 [INFO] [stdout] | [INFO] [stdout] 1214 | if str_file_name.is_some(){ [INFO] [stdout] | -------------------------- help: try: `if let Some() = str_file_name` [INFO] [stdout] ... [INFO] [stdout] 1217 | let err = format!("scan_source_dir: file name '{}' mode returned zero.", str_file_name.unwrap( ) ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `res` after checking its variant with `is_err` [INFO] [stdout] --> src/mapcopy.rs:1244:98 [INFO] [stdout] | [INFO] [stdout] 1243 | if res.is_err(){ [INFO] [stdout] | --------------- help: try: `if let Err() = res` [INFO] [stdout] 1244 | let err = format!("scan_source_dir: ERROR: scan_source_dir raised err: {} ", res.unwrap_err() ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/mapcopy.rs:1181:13 [INFO] [stdout] | [INFO] [stdout] 1181 | let str_this_dir : String ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `str_this_dir` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 1181 ~ [INFO] [stdout] 1182 ~ let str_this_dir : String = if res_this_dir.is_ok() { [INFO] [stdout] 1183 ~ res_this_dir.as_ref().unwrap().to_string() [INFO] [stdout] 1184 | }else { [INFO] [stdout] ... [INFO] [stdout] 1188 | return Err(err); [INFO] [stdout] 1189 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/mapcopy.rs:1185:26 [INFO] [stdout] | [INFO] [stdout] 1185 | let err = format!("scan_source_dir: could not convert file_name() into String " ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"scan_source_dir: could not convert file_name() into String ".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.58s [INFO] [stdout] warning: called `unwrap_err` on `result` after checking its variant with `is_ok` [INFO] [stdout] --> src/main.rs:17:19 [INFO] [stdout] | [INFO] [stdout] 14 | if result.is_ok() { [INFO] [stdout] | ----------------- help: try: `if let Err() = result` [INFO] [stdout] ... [INFO] [stdout] 17 | let err = result.unwrap_err(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "374cfb9b704bb8359dc0c15c5a6708577242bbdd549f1f63d89d03dcde8ec6ae", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "374cfb9b704bb8359dc0c15c5a6708577242bbdd549f1f63d89d03dcde8ec6ae", kill_on_drop: false }` [INFO] [stdout] 374cfb9b704bb8359dc0c15c5a6708577242bbdd549f1f63d89d03dcde8ec6ae