[INFO] fetching crate kumitateru 0.4.0... [INFO] linting kumitateru-0.4.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate kumitateru 0.4.0 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate kumitateru 0.4.0 [INFO] finished tweaking crates.io crate kumitateru 0.4.0 [INFO] tweaked toml for crates.io crate kumitateru 0.4.0 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate kumitateru 0.4.0 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 crates.io crate kumitateru 0.4.0 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 yaserde_derive v0.5.1 [INFO] [stderr] Downloaded yaserde v0.6.0 [INFO] [stderr] Downloaded home v0.5.3 [INFO] [stderr] Downloaded proc-macro2 v1.0.32 [INFO] [stderr] Downloaded crossterm_winapi v0.8.0 [INFO] [stderr] Downloaded signal-hook-registry v1.4.0 [INFO] [stderr] Downloaded colored v2.0.0 [INFO] [stderr] Downloaded signal-hook-mio v0.2.1 [INFO] [stderr] Downloaded anyhow v1.0.45 [INFO] [stderr] Downloaded signal-hook v0.3.10 [INFO] [stderr] Downloaded aho-corasick v0.7.18 [INFO] [stderr] Downloaded mio v0.7.14 [INFO] [stderr] Downloaded unicode-segmentation v1.8.0 [INFO] [stderr] Downloaded crossterm v0.20.0 [INFO] [stderr] Downloaded quick-xml v0.20.0 [INFO] [stderr] Downloaded minidom v0.13.0 [INFO] [stderr] Downloaded syn v1.0.81 [INFO] [stderr] Downloaded regex v1.5.4 [INFO] [stderr] Downloaded regex-syntax v0.6.25 [INFO] [stderr] Downloaded libc v0.2.107 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0d4808597b3723476cb2d012dfcb496dc29b64e0d02ca8092e07fc0503bf6fc7 [INFO] running `Command { std: "docker" "start" "-a" "0d4808597b3723476cb2d012dfcb496dc29b64e0d02ca8092e07fc0503bf6fc7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0d4808597b3723476cb2d012dfcb496dc29b64e0d02ca8092e07fc0503bf6fc7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0d4808597b3723476cb2d012dfcb496dc29b64e0d02ca8092e07fc0503bf6fc7", kill_on_drop: false }` [INFO] [stdout] 0d4808597b3723476cb2d012dfcb496dc29b64e0d02ca8092e07fc0503bf6fc7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 196bb4ba1f030ba02db91d1546055d763ea26211ebe2d3c4e125e9b89a84e2db [INFO] running `Command { std: "docker" "start" "-a" "196bb4ba1f030ba02db91d1546055d763ea26211ebe2d3c4e125e9b89a84e2db", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.107 [INFO] [stderr] Compiling proc-macro2 v1.0.32 [INFO] [stderr] Compiling memchr v2.4.1 [INFO] [stderr] Compiling syn v1.0.81 [INFO] [stderr] Compiling signal-hook v0.3.10 [INFO] [stderr] Compiling serde_derive v1.0.130 [INFO] [stderr] Checking instant v0.1.12 [INFO] [stderr] Compiling serde v1.0.130 [INFO] [stderr] Compiling anyhow v1.0.45 [INFO] [stderr] Checking unicode-width v0.1.9 [INFO] [stderr] Checking lock_api v0.4.5 [INFO] [stderr] Compiling unicode-segmentation v1.8.0 [INFO] [stderr] Checking regex-syntax v0.6.25 [INFO] [stderr] Checking strsim v0.8.0 [INFO] [stderr] Checking vec_map v0.8.2 [INFO] [stderr] Checking ansi_term v0.11.0 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Checking yaserde v0.6.0 [INFO] [stderr] Checking home v0.5.3 [INFO] [stderr] Checking heck v0.3.3 [INFO] [stderr] Checking aho-corasick v0.7.18 [INFO] [stderr] Checking quick-xml v0.20.0 [INFO] [stderr] Checking signal-hook-registry v1.4.0 [INFO] [stderr] Checking mio v0.7.14 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking parking_lot_core v0.8.5 [INFO] [stderr] Checking getrandom v0.2.3 [INFO] [stderr] Checking parking_lot v0.11.2 [INFO] [stderr] Checking uuid v0.8.2 [INFO] [stderr] Checking colored v2.0.0 [INFO] [stderr] Checking clap v2.33.3 [INFO] [stderr] Compiling quote v1.0.10 [INFO] [stderr] Checking minidom v0.13.0 [INFO] [stderr] Checking signal-hook-mio v0.2.1 [INFO] [stderr] Checking crossterm v0.20.0 [INFO] [stderr] Checking regex v1.5.4 [INFO] [stderr] Compiling yaserde_derive v0.5.1 [INFO] [stderr] Checking toml v0.5.8 [INFO] [stderr] Checking kumitateru v0.4.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: function `construct_selection` is never used [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn construct_selection(header: &str, items: Vec<&str>, highlighted: i64, selected: bool) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `display_cli_multiple_selection` is never used [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn display_cli_multiple_selection(header: &str, items: Vec<&str>) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reset_selection` is never used [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:105:4 [INFO] [stdout] | [INFO] [stdout] 105 | fn reset_selection(len: i64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BarrelConfig` is never constructed [INFO] [stdout] --> src/ser_de/config/barrel_config.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct BarrelConfig { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BarrelConfigPackage` is never constructed [INFO] [stdout] --> src/ser_de/config/barrel_config.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct BarrelConfigPackage { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BarrelConfigPackageMeta` is never constructed [INFO] [stdout] --> src/ser_de/config/barrel_config.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct BarrelConfigPackageMeta { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BarrelConfigBuild` is never constructed [INFO] [stdout] --> src/ser_de/config/barrel_config.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | pub struct BarrelConfigBuild { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/prepare_build.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{}", "Copying source code...".bold()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/prepare_build.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{}", "Preparing resources...".bold()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this `if` statement can be collapsed [INFO] [stdout] --> src/prepare_build.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | / if entry.file_type()?.is_dir() { [INFO] [stdout] 36 | | if !device_specific_res.contains(&entry.file_name().to_str().unwrap().to_string()) { [INFO] [stdout] 37 | | device_specific_res.push(entry.file_name().to_str().unwrap().to_string()); [INFO] [stdout] 38 | | } [INFO] [stdout] 39 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 35 ~ if entry.file_type()?.is_dir() [INFO] [stdout] 36 ~ && !device_specific_res.contains(&entry.file_name().to_str().unwrap().to_string()) { [INFO] [stdout] 37 | device_specific_res.push(entry.file_name().to_str().unwrap().to_string()); [INFO] [stdout] 38 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/prepare_build.rs:48:30 [INFO] [stdout] | [INFO] [stdout] 48 | end_dirname.push_str(&*dir); [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 48 - end_dirname.push_str(&*dir); [INFO] [stdout] 48 + end_dirname.push_str(dir); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 48 | end_dirname.push_str(&**dir); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/prepare_build.rs:54:34 [INFO] [stdout] | [INFO] [stdout] 54 | for language in parse_config(&*fs::read_to_string("package.toml").unwrap()).package_meta.languages { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&fs::read_to_string("package.toml").unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/prepare_build.rs:69:34 [INFO] [stdout] | [INFO] [stdout] 69 | end_dirname.push_str(&*language); [INFO] [stdout] | ^^^^^^^^^^ help: try: `&language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/prepare_build.rs:93:104 [INFO] [stdout] | [INFO] [stdout] 93 | ...t).with_context(|| format!("Failed to copy {}", format!("{}/{}", "dependencies", value[1].as_str().unwrap())))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/prepare_build.rs:101:37 [INFO] [stdout] | [INFO] [stdout] 101 | monkey_jungle_data.push_str(&*format!("{} = \"{}\"\n", entry, format!("dependencies/{}", value[1].as_str().unwrap()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("{} = \"{}\"\n", entry, format!("dependencies/{}", value[1].as_str().unwrap()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/prepare_build.rs:101:39 [INFO] [stdout] | [INFO] [stdout] 101 | monkey_jungle_data.push_str(&*format!("{} = \"{}\"\n", entry, format!("dependencies/{}", value[1].as_str().unwrap()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/prepare_build.rs:102:37 [INFO] [stdout] | [INFO] [stdout] 102 | monkey_jungle_data.push_str(&*format!("base.barrelPath = $(base.barrelPath);$({})\n", entry)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("base.barrelPath = $(base.barrelPath);$({})\n", entry)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/prepare_build.rs:133:34 [INFO] [stdout] | [INFO] [stdout] 133 | end_dirname.push_str(&*res_entry); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&res_entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/utils/fs_utils.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | if end != None { [INFO] [stdout] | ^^^^^^^^^^^ help: use `Option::is_some()` instead: `end.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/utils/tui/item_selection.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | let mut result = String::from(header.to_owned() + "\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `(header.to_owned() + "\n")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/item_selection.rs:20:29 [INFO] [stdout] | [INFO] [stdout] 20 | result.push_str(&*format!("{}", format!("{}) {}", i + 1, items[i].clone()).bold())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("{}", format!("{}) {}", i + 1, items[i].clone()).bold())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/item_selection.rs:22:29 [INFO] [stdout] | [INFO] [stdout] 22 | result.push_str(&*format!("{}) {}", i + 1, items[i].clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("{}) {}", i + 1, items[i].clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/item_selection.rs:29:25 [INFO] [stdout] | [INFO] [stdout] 29 | result.push_str(&*filler); [INFO] [stdout] | ^^^^^^^^ help: try: `&filler` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/utils/tui/item_selection.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [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: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/item_selection.rs:55:46 [INFO] [stdout] | [INFO] [stdout] 55 | ... print!("{}", construct_selection(&*("\n".to_owned() + header), items.clone(), highlighted, if exiting_state { true } else { fa... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&("\n".to_owned() + header)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/utils/tui/item_selection.rs:55:104 [INFO] [stdout] | [INFO] [stdout] 55 | ...clone(), highlighted, if exiting_state { true } else { false })); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `exiting_state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/utils/tui/item_selection.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | / match event { [INFO] [stdout] 63 | | Event::Resize(_, _) => { [INFO] [stdout] 64 | | disable_raw_mode()?; [INFO] [stdout] 65 | | continue; [INFO] [stdout] 66 | | } [INFO] [stdout] 67 | | _ => {} [INFO] [stdout] 68 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 62 ~ if let Event::Resize(_, _) = event { [INFO] [stdout] 63 + disable_raw_mode()?; [INFO] [stdout] 64 + continue; [INFO] [stdout] 65 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | let mut result = String::from(header.to_owned() + "\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `(header.to_owned() + "\n")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:20:29 [INFO] [stdout] | [INFO] [stdout] 20 | result.push_str(&*format!("{}", format!("{}) {}", i + 1, items[i].clone()).bold())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("{}", format!("{}) {}", i + 1, items[i].clone()).bold())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `construct_selection` is never used [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn construct_selection(header: &str, items: Vec<&str>, highlighted: i64, selected: bool) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `display_cli_multiple_selection` is never used [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn display_cli_multiple_selection(header: &str, items: Vec<&str>) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reset_selection` is never used [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:105:4 [INFO] [stdout] | [INFO] [stdout] 105 | fn reset_selection(len: i64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BarrelConfig` is never constructed [INFO] [stdout] --> src/ser_de/config/barrel_config.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct BarrelConfig { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BarrelConfigPackage` is never constructed [INFO] [stdout] --> src/ser_de/config/barrel_config.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct BarrelConfigPackage { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BarrelConfigPackageMeta` is never constructed [INFO] [stdout] --> src/ser_de/config/barrel_config.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct BarrelConfigPackageMeta { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BarrelConfigBuild` is never constructed [INFO] [stdout] --> src/ser_de/config/barrel_config.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | pub struct BarrelConfigBuild { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:22:29 [INFO] [stdout] | [INFO] [stdout] 22 | result.push_str(&*format!("{}) {}", i + 1, items[i].clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("{}) {}", i + 1, items[i].clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:29:25 [INFO] [stdout] | [INFO] [stdout] 29 | result.push_str(&*filler); [INFO] [stdout] | ^^^^^^^^ help: try: `&filler` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [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] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:55:46 [INFO] [stdout] | [INFO] [stdout] 55 | ... print!("{}", construct_selection(&*("\n".to_owned() + header), items.clone(), highlighted, if exiting_state { true } else { fa... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&("\n".to_owned() + header)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:55:104 [INFO] [stdout] | [INFO] [stdout] 55 | ...clone(), highlighted, if exiting_state { true } else { false })); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `exiting_state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | / match event { [INFO] [stdout] 63 | | Event::Resize(_, _) => { [INFO] [stdout] 64 | | disable_raw_mode()?; [INFO] [stdout] 65 | | continue; [INFO] [stdout] 66 | | } [INFO] [stdout] 67 | | _ => {} [INFO] [stdout] 68 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 62 ~ if let Event::Resize(_, _) = event { [INFO] [stdout] 63 + disable_raw_mode()?; [INFO] [stdout] 64 + continue; [INFO] [stdout] 65 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/prepare_build.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{}", "Copying source code...".bold()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/prepare_build.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{}", "Preparing resources...".bold()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:18:16 [INFO] [stdout] | [INFO] [stdout] 18 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Failed to get current working directory. Exiting...".bright_red()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:30:16 [INFO] [stdout] | [INFO] [stdout] 30 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Failed to get current working directory. Exiting...".bright_red()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{}", "Reading config...".bold()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Failed to get strings in string resources. Exiting...".bright_red()... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this `if` statement can be collapsed [INFO] [stdout] --> src/prepare_build.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | / if entry.file_type()?.is_dir() { [INFO] [stdout] 36 | | if !device_specific_res.contains(&entry.file_name().to_str().unwrap().to_string()) { [INFO] [stdout] 37 | | device_specific_res.push(entry.file_name().to_str().unwrap().to_string()); [INFO] [stdout] 38 | | } [INFO] [stdout] 39 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 35 ~ if entry.file_type()?.is_dir() [INFO] [stdout] 36 ~ && !device_specific_res.contains(&entry.file_name().to_str().unwrap().to_string()) { [INFO] [stdout] 37 | device_specific_res.push(entry.file_name().to_str().unwrap().to_string()); [INFO] [stdout] 38 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:70:28 [INFO] [stdout] | [INFO] [stdout] 70 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Something had gone wrong while reading files. Exiting...".bright_re... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:76:20 [INFO] [stdout] | [INFO] [stdout] 76 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Something had gone wrong while reading files. Exiting...".bright_re... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:85:12 [INFO] [stdout] | [INFO] [stdout] 85 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Language resources don't match up. Please remove unused languages f... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{}", "Successfully verified project structure!".bold().green()) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: deref on an immutable reference [INFO] [stdout] --> src/prepare_build.rs:48:30 [INFO] [stdout] | [INFO] [stdout] 48 | end_dirname.push_str(&*dir); [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 48 - end_dirname.push_str(&*dir); [INFO] [stdout] 48 + end_dirname.push_str(dir); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 48 | end_dirname.push_str(&**dir); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/prepare_build.rs:54:34 [INFO] [stdout] | [INFO] [stdout] 54 | for language in parse_config(&*fs::read_to_string("package.toml").unwrap()).package_meta.languages { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&fs::read_to_string("package.toml").unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/verify_project.rs:41:38 [INFO] [stdout] | [INFO] [stdout] 41 | let parsed_config = parse_config(&*config_string.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&config_string.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/verify_project.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | let string_resource_directories: ReadDir; [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 `string_resource_directories` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 43 ~ [INFO] [stdout] 44 ~ let string_resource_directories: ReadDir = match fs::read_dir(resources_strings_location) { [INFO] [stdout] 45 | Ok(dir) => { [INFO] [stdout] 46 ~ dir [INFO] [stdout] 47 | } [INFO] [stdout] ... [INFO] [stdout] 51 | } [INFO] [stdout] 52 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/prepare_build.rs:69:34 [INFO] [stdout] | [INFO] [stdout] 69 | end_dirname.push_str(&*language); [INFO] [stdout] | ^^^^^^^^^^ help: try: `&language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/prepare_build.rs:93:104 [INFO] [stdout] | [INFO] [stdout] 93 | ...t).with_context(|| format!("Failed to copy {}", format!("{}/{}", "dependencies", value[1].as_str().unwrap())))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/verify_project.rs:95:32 [INFO] [stdout] | [INFO] [stdout] 95 | if entry.path() == PathBuf::from("resources/strings") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*"resources/strings"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/verify_project.rs:105:49 [INFO] [stdout] | [INFO] [stdout] 105 | resources.push(basename(&*entry_string, '/').to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `&entry_string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/prepare_build.rs:101:37 [INFO] [stdout] | [INFO] [stdout] 101 | monkey_jungle_data.push_str(&*format!("{} = \"{}\"\n", entry, format!("dependencies/{}", value[1].as_str().unwrap()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("{} = \"{}\"\n", entry, format!("dependencies/{}", value[1].as_str().unwrap()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/prepare_build.rs:101:39 [INFO] [stdout] | [INFO] [stdout] 101 | monkey_jungle_data.push_str(&*format!("{} = \"{}\"\n", entry, format!("dependencies/{}", value[1].as_str().unwrap()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:129:20 [INFO] [stdout] | [INFO] [stdout] 129 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Detected device-specific resource declarations for devices that \ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: length comparison to zero [INFO] [stdout] --> src/verify_project.rs:126:8 [INFO] [stdout] | [INFO] [stdout] 126 | if res.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!res.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: deref which would be done by auto-deref [INFO] [stdout] --> src/prepare_build.rs:102:37 [INFO] [stdout] | [INFO] [stdout] 102 | monkey_jungle_data.push_str(&*format!("base.barrelPath = $(base.barrelPath);$({})\n", entry)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("base.barrelPath = $(base.barrelPath);$({})\n", entry)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/compile_project.rs:34:20 [INFO] [stdout] | [INFO] [stdout] 34 | if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Build failed."); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/compile_project.rs:81:20 [INFO] [stdout] | [INFO] [stdout] 81 | if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Build failed."); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: deref which would be done by auto-deref [INFO] [stdout] --> src/prepare_build.rs:133:34 [INFO] [stdout] | [INFO] [stdout] 133 | end_dirname.push_str(&*res_entry); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&res_entry` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compile_project.rs:32:52 [INFO] [stdout] | [INFO] [stdout] 32 | println!("{}", String::from_utf8_lossy(&*command.output().with_context(|| "Failed to run Monkey C compiler")?.stderr)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&command.output().with_context(|| "Failed to run Monkey C compiler")?.stderr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/compile_project.rs:41:36 [INFO] [stdout] | [INFO] [stdout] 41 | let mut app_name = String::from(config.package_meta.name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `config.package_meta.name.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/compile_project.rs:42:17 [INFO] [stdout] | [INFO] [stdout] 42 | app_name.push_str("-"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `app_name.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] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compile_project.rs:43:35 [INFO] [stdout] | [INFO] [stdout] 43 | app_name.push_str(&*device); [INFO] [stdout] | ^^^^^^^^ help: try: `&device` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/utils/fs_utils.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | if end != None { [INFO] [stdout] | ^^^^^^^^^^^ help: use `Option::is_some()` instead: `end.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/utils/tui/item_selection.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | let mut result = String::from(header.to_owned() + "\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `(header.to_owned() + "\n")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/item_selection.rs:20:29 [INFO] [stdout] | [INFO] [stdout] 20 | result.push_str(&*format!("{}", format!("{}) {}", i + 1, items[i].clone()).bold())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("{}", format!("{}) {}", i + 1, items[i].clone()).bold())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/item_selection.rs:22:29 [INFO] [stdout] | [INFO] [stdout] 22 | result.push_str(&*format!("{}) {}", i + 1, items[i].clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("{}) {}", i + 1, items[i].clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/item_selection.rs:29:25 [INFO] [stdout] | [INFO] [stdout] 29 | result.push_str(&*filler); [INFO] [stdout] | ^^^^^^^^ help: try: `&filler` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/utils/tui/item_selection.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [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: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/item_selection.rs:55:46 [INFO] [stdout] | [INFO] [stdout] 55 | ... print!("{}", construct_selection(&*("\n".to_owned() + header), items.clone(), highlighted, if exiting_state { true } else { fa... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&("\n".to_owned() + header)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/utils/tui/item_selection.rs:55:104 [INFO] [stdout] | [INFO] [stdout] 55 | ...clone(), highlighted, if exiting_state { true } else { false })); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `exiting_state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/utils/tui/item_selection.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | / match event { [INFO] [stdout] 63 | | Event::Resize(_, _) => { [INFO] [stdout] 64 | | disable_raw_mode()?; [INFO] [stdout] 65 | | continue; [INFO] [stdout] 66 | | } [INFO] [stdout] 67 | | _ => {} [INFO] [stdout] 68 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 62 ~ if let Event::Resize(_, _) = event { [INFO] [stdout] 63 + disable_raw_mode()?; [INFO] [stdout] 64 + continue; [INFO] [stdout] 65 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | let mut result = String::from(header.to_owned() + "\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `(header.to_owned() + "\n")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:20:29 [INFO] [stdout] | [INFO] [stdout] 20 | result.push_str(&*format!("{}", format!("{}) {}", i + 1, items[i].clone()).bold())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("{}", format!("{}) {}", i + 1, items[i].clone()).bold())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:22:29 [INFO] [stdout] | [INFO] [stdout] 22 | result.push_str(&*format!("{}) {}", i + 1, items[i].clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("{}) {}", i + 1, items[i].clone())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:29:25 [INFO] [stdout] | [INFO] [stdout] 29 | result.push_str(&*filler); [INFO] [stdout] | ^^^^^^^^ help: try: `&filler` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [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] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:55:46 [INFO] [stdout] | [INFO] [stdout] 55 | ... print!("{}", construct_selection(&*("\n".to_owned() + header), items.clone(), highlighted, if exiting_state { true } else { fa... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&("\n".to_owned() + header)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:55:104 [INFO] [stdout] | [INFO] [stdout] 55 | ...clone(), highlighted, if exiting_state { true } else { false })); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `exiting_state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | / match event { [INFO] [stdout] 63 | | Event::Resize(_, _) => { [INFO] [stdout] 64 | | disable_raw_mode()?; [INFO] [stdout] 65 | | continue; [INFO] [stdout] 66 | | } [INFO] [stdout] 67 | | _ => {} [INFO] [stdout] 68 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 62 ~ if let Event::Resize(_, _) = event { [INFO] [stdout] 63 + disable_raw_mode()?; [INFO] [stdout] 64 + continue; [INFO] [stdout] 65 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:18:16 [INFO] [stdout] | [INFO] [stdout] 18 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Failed to get current working directory. Exiting...".bright_red()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:30:16 [INFO] [stdout] | [INFO] [stdout] 30 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Failed to get current working directory. Exiting...".bright_red()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{}", "Reading config...".bold()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Failed to get strings in string resources. Exiting...".bright_red()... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:70:28 [INFO] [stdout] | [INFO] [stdout] 70 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Something had gone wrong while reading files. Exiting...".bright_re... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:76:20 [INFO] [stdout] | [INFO] [stdout] 76 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Something had gone wrong while reading files. Exiting...".bright_re... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:85:12 [INFO] [stdout] | [INFO] [stdout] 85 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Language resources don't match up. Please remove unused languages f... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{}", "Successfully verified project structure!".bold().green()) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: deref which would be done by auto-deref [INFO] [stdout] --> src/verify_project.rs:41:38 [INFO] [stdout] | [INFO] [stdout] 41 | let parsed_config = parse_config(&*config_string.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&config_string.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/verify_project.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | let string_resource_directories: ReadDir; [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 `string_resource_directories` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 43 ~ [INFO] [stdout] 44 ~ let string_resource_directories: ReadDir = match fs::read_dir(resources_strings_location) { [INFO] [stdout] 45 | Ok(dir) => { [INFO] [stdout] 46 ~ dir [INFO] [stdout] 47 | } [INFO] [stdout] ... [INFO] [stdout] 51 | } [INFO] [stdout] 52 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/verify_project.rs:95:32 [INFO] [stdout] | [INFO] [stdout] 95 | if entry.path() == PathBuf::from("resources/strings") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*"resources/strings"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/verify_project.rs:105:49 [INFO] [stdout] | [INFO] [stdout] 105 | resources.push(basename(&*entry_string, '/').to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `&entry_string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/verify_project.rs:129:20 [INFO] [stdout] | [INFO] [stdout] 129 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("{}", "Detected device-specific resource declarations for devices that \ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: length comparison to zero [INFO] [stdout] --> src/verify_project.rs:126:8 [INFO] [stdout] | [INFO] [stdout] 126 | if res.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!res.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/compile_project.rs:34:20 [INFO] [stdout] | [INFO] [stdout] 34 | if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Build failed."); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/compile_project.rs:81:20 [INFO] [stdout] | [INFO] [stdout] 81 | if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Build failed."); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: deref which would be done by auto-deref [INFO] [stdout] --> src/compile_project.rs:32:52 [INFO] [stdout] | [INFO] [stdout] 32 | println!("{}", String::from_utf8_lossy(&*command.output().with_context(|| "Failed to run Monkey C compiler")?.stderr)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&command.output().with_context(|| "Failed to run Monkey C compiler")?.stderr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/compile_project.rs:41:36 [INFO] [stdout] | [INFO] [stdout] 41 | let mut app_name = String::from(config.package_meta.name.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `config.package_meta.name.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/compile_project.rs:42:17 [INFO] [stdout] | [INFO] [stdout] 42 | app_name.push_str("-"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `app_name.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] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/compile_project.rs:43:35 [INFO] [stdout] | [INFO] [stdout] 43 | app_name.push_str(&*device); [INFO] [stdout] | ^^^^^^^^ help: try: `&device` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | return Ok(serialized_manifest) [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] 73 - return Ok(serialized_manifest) [INFO] [stdout] 73 + Ok(serialized_manifest) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | return Ok(serialized_manifest) [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] 73 - return Ok(serialized_manifest) [INFO] [stdout] 73 + Ok(serialized_manifest) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ser_de/parse_config.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | return toml::from_str::(config).with_context(|| "Unable to parse package.toml").unwrap(); [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] 5 - return toml::from_str::(config).with_context(|| "Unable to parse package.toml").unwrap(); [INFO] [stdout] 5 + toml::from_str::(config).with_context(|| "Unable to parse package.toml").unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ciq_sdk.rs:29:24 [INFO] [stdout] | [INFO] [stdout] 29 | if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Sorry, could not find any SDKs. Please download any!"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/ciq_sdk.rs:52:24 [INFO] [stdout] | [INFO] [stdout] 52 | if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Sorry, could not find any SDKs. Please download any!"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/ciq_sdk.rs:57:20 [INFO] [stdout] | [INFO] [stdout] 57 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Sorry, unsupported OS. Please, run this binary only on supported OS'es(ma... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: unneeded `return` statement [INFO] [stdout] --> src/ciq_sdk.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | / return match env::consts::OS { [INFO] [stdout] 10 | | "macos" => { [INFO] [stdout] 11 | | // Searching for SDKs [INFO] [stdout] 12 | | let mut sdk_versions: Vec = Vec::new(); [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [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] 9 ~ match env::consts::OS { [INFO] [stdout] 10 + "macos" => { [INFO] [stdout] 11 + // Searching for SDKs [INFO] [stdout] 12 + let mut sdk_versions: Vec = Vec::new(); [INFO] [stdout] 13 + let mut sdk_paths: Vec = Vec::new(); [INFO] [stdout] 14 + let home_dir = home::home_dir().unwrap(); [INFO] [stdout] 15 + let sdk_dir_path = PathBuf::from(format!("{}{}", home_dir.to_str().unwrap(), "/Library/Application Support/Garmin/ConnectIQ/Sdks/")); [INFO] [stdout] 16 + for path in fs::read_dir(sdk_dir_path).with_context(|| "Unable to read SDK directory contents").unwrap() { [INFO] [stdout] 17 + let path = path.unwrap(); [INFO] [stdout] 18 + sdk_paths.push(path.path()); [INFO] [stdout] 19 + let path = path.file_name().to_str().unwrap().to_string(); [INFO] [stdout] 20 + let sdk_version = &path[18..23]; [INFO] [stdout] 21 + sdk_versions.push(sdk_version.to_string()); [INFO] [stdout] 22 + } [INFO] [stdout] 23 + if sdk_versions.contains(&sdk_version.to_string()) { [INFO] [stdout] 24 + let pos = sdk_versions.clone().iter().position(|r| r == sdk_version).unwrap(); [INFO] [stdout] 25 + let mut path = (&*sdk_paths[pos]).to_path_buf(); [INFO] [stdout] 26 + path.push("bin"); [INFO] [stdout] 27 + Ok(path) [INFO] [stdout] 28 + } else { [INFO] [stdout] 29 + if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Sorry, could not find any SDKs. Please download any!"); } [INFO] [stdout] 30 + process::exit(24); // Error code 24 signifies that kumitateru was unable to find any SDKs because the CIQ folder did not exist or was empty. [INFO] [stdout] 31 + } [INFO] [stdout] 32 + } [INFO] [stdout] 33 + "windows" => { [INFO] [stdout] 34 + // Searching for SDKs [INFO] [stdout] 35 + let mut sdk_versions: Vec = Vec::new(); [INFO] [stdout] 36 + let mut sdk_paths: Vec = Vec::new(); [INFO] [stdout] 37 + let home_dir = home::home_dir().unwrap(); [INFO] [stdout] 38 + let sdk_dir_path = PathBuf::from(format!("{}{}", home_dir.to_str().unwrap(), "\\AppData\\Roaming\\Garmin\\ConnectIQ\\Sdks")); [INFO] [stdout] 39 + for path in fs::read_dir(sdk_dir_path).with_context(|| "Unable to read SDK directory contents").unwrap() { [INFO] [stdout] 40 + let path = path.unwrap(); [INFO] [stdout] 41 + sdk_paths.push(path.path()); [INFO] [stdout] 42 + let path = path.file_name().to_str().unwrap().to_string(); [INFO] [stdout] 43 + let sdk_version = &path[18..23]; [INFO] [stdout] 44 + sdk_versions.push(sdk_version.to_string()); [INFO] [stdout] 45 + } [INFO] [stdout] 46 + if sdk_versions.contains(&sdk_version.to_string()) { [INFO] [stdout] 47 + let pos = sdk_versions.clone().iter().position(|r| r == sdk_version).unwrap(); [INFO] [stdout] 48 + let mut path = (&*sdk_paths[pos]).to_path_buf(); [INFO] [stdout] 49 + path.push("bin"); [INFO] [stdout] 50 + Ok(path) [INFO] [stdout] 51 + } else { [INFO] [stdout] 52 + if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Sorry, could not find any SDKs. Please download any!"); } [INFO] [stdout] 53 + process::exit(24); // Error code 24 signifies that kumitateru was unable to find any SDKs because the CIQ folder did not exist or was empty. [INFO] [stdout] 54 + } [INFO] [stdout] 55 + } [INFO] [stdout] 56 + &_ => { [INFO] [stdout] 57 + if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Sorry, unsupported OS. Please, run this binary only on supported OS'es(macOS and Windows)"); } [INFO] [stdout] 58 + process::exit(25); // Error code 25 signifies that kumitateru was unable to find any SDKs because the system is unsupported. [INFO] [stdout] 59 + } [INFO] [stdout] 60 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/ciq_sdk.rs:25:36 [INFO] [stdout] | [INFO] [stdout] 25 | let mut path = (&*sdk_paths[pos]).to_path_buf(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `(*sdk_paths[pos])` [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: deref which would be done by auto-deref [INFO] [stdout] --> src/ciq_sdk.rs:25:36 [INFO] [stdout] | [INFO] [stdout] 25 | let mut path = (&*sdk_paths[pos]).to_path_buf(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `&sdk_paths[pos]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/ciq_sdk.rs:48:36 [INFO] [stdout] | [INFO] [stdout] 48 | let mut path = (&*sdk_paths[pos]).to_path_buf(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `(*sdk_paths[pos])` [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: deref which would be done by auto-deref [INFO] [stdout] --> src/ciq_sdk.rs:48:36 [INFO] [stdout] | [INFO] [stdout] 48 | let mut path = (&*sdk_paths[pos]).to_path_buf(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `&sdk_paths[pos]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:81:28 [INFO] [stdout] | [INFO] [stdout] 81 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("Building the app..."); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:89:28 [INFO] [stdout] | [INFO] [stdout] 89 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{}", "Successfully built!".bold().bright_green()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:91:28 [INFO] [stdout] | [INFO] [stdout] 91 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Kumitateru does not support building libraries(barrels) at the time. Plea... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:94:28 [INFO] [stdout] | [INFO] [stdout] 94 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Bad project type specified. Please, set it to \"app\" and leave it alone.... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:108:28 [INFO] [stdout] | [INFO] [stdout] 108 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("Running the app..."); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:116:28 [INFO] [stdout] | [INFO] [stdout] 116 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 4:".bold().bright_green(), "Run"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:126:28 [INFO] [stdout] | [INFO] [stdout] 126 | if !env::var("KMTR_IDE_SILENT").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:137:28 [INFO] [stdout] | [INFO] [stdout] 137 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("Packaging the app..."); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:147:28 [INFO] [stdout] | [INFO] [stdout] 147 | if !env::var("KMTR_IDE_SILENT").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:73:54 [INFO] [stdout] | [INFO] [stdout] 73 | let config_struct = parse_config(&*config_str.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `&config_str.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:74:73 [INFO] [stdout] | [INFO] [stdout] 74 | ... let package_type = toml::from_str::(&*config_str.clone()).with_context(|| "Unable to parse package.toml")?.pac... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `&config_str.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:75:40 [INFO] [stdout] | [INFO] [stdout] 75 | if package_type == String::from("app") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `"app"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:90:47 [INFO] [stdout] | [INFO] [stdout] 90 | } else if package_type == String::from("lib") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `"lib"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:100:54 [INFO] [stdout] | [INFO] [stdout] 100 | let config_struct = parse_config(&*config_str.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `&config_str.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:101:73 [INFO] [stdout] | [INFO] [stdout] 101 | ... let package_type = toml::from_str::(&*config_str.clone()).with_context(|| "Unable to parse package.toml")?.pa... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `&config_str.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:102:40 [INFO] [stdout] | [INFO] [stdout] 102 | if package_type == String::from("app") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `"app"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:116:118 [INFO] [stdout] | [INFO] [stdout] 116 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 4:".bold().bright_green(), "Run"); } [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 116 - if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 4:".bold().bright_green(), "Run"); } [INFO] [stdout] 116 + if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} Run", "Step 4:".bold().bright_green()); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:134:54 [INFO] [stdout] | [INFO] [stdout] 134 | let config_struct = parse_config(&*config_str); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&config_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:135:73 [INFO] [stdout] | [INFO] [stdout] 135 | ... let package_type = toml::from_str::(&*config_str).with_context(|| "Unable to parse package.toml")?.package.pa... [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&config_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:155:21 [INFO] [stdout] | [INFO] [stdout] 155 | let proj_type: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 162 | / proj_type = vec!( [INFO] [stdout] 163 | | "watch-app", [INFO] [stdout] 164 | | "watchface", [INFO] [stdout] 165 | | "datafield", [INFO] [stdout] ... | [INFO] [stdout] 175 | | "Audio content provider" [INFO] [stdout] 176 | | ))? as usize].to_string(); [INFO] [stdout] | |_________________________________________________^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `proj_type` here [INFO] [stdout] | [INFO] [stdout] 155 ~ [INFO] [stdout] 156 | let proj_min_sdk: String; [INFO] [stdout] ... [INFO] [stdout] 161 | io::stdin().read_line(&mut proj_name); [INFO] [stdout] 162 ~ let proj_type: String = vec!( [INFO] [stdout] 163 + "watch-app", [INFO] [stdout] 164 + "watchface", [INFO] [stdout] 165 + "datafield", [INFO] [stdout] 166 + "widget", [INFO] [stdout] 167 + "audio-content-provider" [INFO] [stdout] 168 + )[display_cli_item_selection( [INFO] [stdout] 169 + "Now what type is your app?", [INFO] [stdout] 170 + vec!( [INFO] [stdout] 171 + "App", [INFO] [stdout] 172 + "Watchface", [INFO] [stdout] 173 + "Datafield", [INFO] [stdout] 174 + "Widget", [INFO] [stdout] 175 + "Audio content provider" [INFO] [stdout] 176 ~ ))? as usize].to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:156:21 [INFO] [stdout] | [INFO] [stdout] 156 | let proj_min_sdk: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 178 | proj_min_sdk = get_version(VersionType::MinSDK); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `proj_min_sdk` here [INFO] [stdout] | [INFO] [stdout] 156 ~ [INFO] [stdout] 157 | let proj_target_sdk: String; [INFO] [stdout] ... [INFO] [stdout] 177 | [INFO] [stdout] 178 ~ let proj_min_sdk: String = get_version(VersionType::MinSDK); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:157:21 [INFO] [stdout] | [INFO] [stdout] 157 | let proj_target_sdk: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 180 | proj_target_sdk = get_version(VersionType::TargetSDK); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `proj_target_sdk` here [INFO] [stdout] | [INFO] [stdout] 157 ~ [INFO] [stdout] 158 | let mut proj_signing_key: Option = None; // If none, then a new key should be generated. If some, then it will be imported [INFO] [stdout] ... [INFO] [stdout] 179 | [INFO] [stdout] 180 ~ let proj_target_sdk: String = get_version(VersionType::TargetSDK); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ser_de/parse_config.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | return toml::from_str::(config).with_context(|| "Unable to parse package.toml").unwrap(); [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] 5 - return toml::from_str::(config).with_context(|| "Unable to parse package.toml").unwrap(); [INFO] [stdout] 5 + toml::from_str::(config).with_context(|| "Unable to parse package.toml").unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:189:24 [INFO] [stdout] | [INFO] [stdout] 189 | if proj_signing_key == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `proj_signing_key.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ciq_sdk.rs:29:24 [INFO] [stdout] | [INFO] [stdout] 29 | if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Sorry, could not find any SDKs. Please download any!"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/ciq_sdk.rs:52:24 [INFO] [stdout] | [INFO] [stdout] 52 | if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Sorry, could not find any SDKs. Please download any!"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/ciq_sdk.rs:57:20 [INFO] [stdout] | [INFO] [stdout] 57 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Sorry, unsupported OS. Please, run this binary only on supported OS'es(ma... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: unneeded `return` statement [INFO] [stdout] --> src/ciq_sdk.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | / return match env::consts::OS { [INFO] [stdout] 10 | | "macos" => { [INFO] [stdout] 11 | | // Searching for SDKs [INFO] [stdout] 12 | | let mut sdk_versions: Vec = Vec::new(); [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [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] 9 ~ match env::consts::OS { [INFO] [stdout] 10 + "macos" => { [INFO] [stdout] 11 + // Searching for SDKs [INFO] [stdout] 12 + let mut sdk_versions: Vec = Vec::new(); [INFO] [stdout] 13 + let mut sdk_paths: Vec = Vec::new(); [INFO] [stdout] 14 + let home_dir = home::home_dir().unwrap(); [INFO] [stdout] 15 + let sdk_dir_path = PathBuf::from(format!("{}{}", home_dir.to_str().unwrap(), "/Library/Application Support/Garmin/ConnectIQ/Sdks/")); [INFO] [stdout] 16 + for path in fs::read_dir(sdk_dir_path).with_context(|| "Unable to read SDK directory contents").unwrap() { [INFO] [stdout] 17 + let path = path.unwrap(); [INFO] [stdout] 18 + sdk_paths.push(path.path()); [INFO] [stdout] 19 + let path = path.file_name().to_str().unwrap().to_string(); [INFO] [stdout] 20 + let sdk_version = &path[18..23]; [INFO] [stdout] 21 + sdk_versions.push(sdk_version.to_string()); [INFO] [stdout] 22 + } [INFO] [stdout] 23 + if sdk_versions.contains(&sdk_version.to_string()) { [INFO] [stdout] 24 + let pos = sdk_versions.clone().iter().position(|r| r == sdk_version).unwrap(); [INFO] [stdout] 25 + let mut path = (&*sdk_paths[pos]).to_path_buf(); [INFO] [stdout] 26 + path.push("bin"); [INFO] [stdout] 27 + Ok(path) [INFO] [stdout] 28 + } else { [INFO] [stdout] 29 + if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Sorry, could not find any SDKs. Please download any!"); } [INFO] [stdout] 30 + process::exit(24); // Error code 24 signifies that kumitateru was unable to find any SDKs because the CIQ folder did not exist or was empty. [INFO] [stdout] 31 + } [INFO] [stdout] 32 + } [INFO] [stdout] 33 + "windows" => { [INFO] [stdout] 34 + // Searching for SDKs [INFO] [stdout] 35 + let mut sdk_versions: Vec = Vec::new(); [INFO] [stdout] 36 + let mut sdk_paths: Vec = Vec::new(); [INFO] [stdout] 37 + let home_dir = home::home_dir().unwrap(); [INFO] [stdout] 38 + let sdk_dir_path = PathBuf::from(format!("{}{}", home_dir.to_str().unwrap(), "\\AppData\\Roaming\\Garmin\\ConnectIQ\\Sdks")); [INFO] [stdout] 39 + for path in fs::read_dir(sdk_dir_path).with_context(|| "Unable to read SDK directory contents").unwrap() { [INFO] [stdout] 40 + let path = path.unwrap(); [INFO] [stdout] 41 + sdk_paths.push(path.path()); [INFO] [stdout] 42 + let path = path.file_name().to_str().unwrap().to_string(); [INFO] [stdout] 43 + let sdk_version = &path[18..23]; [INFO] [stdout] 44 + sdk_versions.push(sdk_version.to_string()); [INFO] [stdout] 45 + } [INFO] [stdout] 46 + if sdk_versions.contains(&sdk_version.to_string()) { [INFO] [stdout] 47 + let pos = sdk_versions.clone().iter().position(|r| r == sdk_version).unwrap(); [INFO] [stdout] 48 + let mut path = (&*sdk_paths[pos]).to_path_buf(); [INFO] [stdout] 49 + path.push("bin"); [INFO] [stdout] 50 + Ok(path) [INFO] [stdout] 51 + } else { [INFO] [stdout] 52 + if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Sorry, could not find any SDKs. Please download any!"); } [INFO] [stdout] 53 + process::exit(24); // Error code 24 signifies that kumitateru was unable to find any SDKs because the CIQ folder did not exist or was empty. [INFO] [stdout] 54 + } [INFO] [stdout] 55 + } [INFO] [stdout] 56 + &_ => { [INFO] [stdout] 57 + if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Sorry, unsupported OS. Please, run this binary only on supported OS'es(macOS and Windows)"); } [INFO] [stdout] 58 + process::exit(25); // Error code 25 signifies that kumitateru was unable to find any SDKs because the system is unsupported. [INFO] [stdout] 59 + } [INFO] [stdout] 60 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:265:5 [INFO] [stdout] | [INFO] [stdout] 265 | return version [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] 265 - return version [INFO] [stdout] 265 + version [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/ciq_sdk.rs:25:36 [INFO] [stdout] | [INFO] [stdout] 25 | let mut path = (&*sdk_paths[pos]).to_path_buf(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `(*sdk_paths[pos])` [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: deref which would be done by auto-deref [INFO] [stdout] --> src/ciq_sdk.rs:25:36 [INFO] [stdout] | [INFO] [stdout] 25 | let mut path = (&*sdk_paths[pos]).to_path_buf(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `&sdk_paths[pos]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:261:32 [INFO] [stdout] | [INFO] [stdout] 261 | if !version_regex.is_match(&*version) { [INFO] [stdout] | ^^^^^^^^^ help: try: `&version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:270:8 [INFO] [stdout] | [INFO] [stdout] 270 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 1:".bold().bright_green(), "Verify project structure"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:272:8 [INFO] [stdout] | [INFO] [stdout] 272 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 2:".bold().bright_green(), "Assemble a ConnectIQ Project"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:277:8 [INFO] [stdout] | [INFO] [stdout] 277 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{}", "Successfully assembled!".bold().bright_green()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:278:8 [INFO] [stdout] | [INFO] [stdout] 278 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 3:".bold().bright_green(), "Compile the app"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:269:40 [INFO] [stdout] | [INFO] [stdout] 269 | let bin_loc = CIQSdk::bin_location(&*config.package.target_sdk)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&config.package.target_sdk` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:270:98 [INFO] [stdout] | [INFO] [stdout] 270 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 1:".bold().bright_green(), "Verify project structure"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 270 - if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 1:".bold().bright_green(), "Verify project structure"); } [INFO] [stdout] 270 + if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} Verify project structure", "Step 1:".bold().bright_green()); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/ciq_sdk.rs:48:36 [INFO] [stdout] | [INFO] [stdout] 48 | let mut path = (&*sdk_paths[pos]).to_path_buf(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `(*sdk_paths[pos])` [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: literal with an empty format string [INFO] [stdout] --> src/main.rs:272:98 [INFO] [stdout] | [INFO] [stdout] 272 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 2:".bold().bright_green(), "Assemble a ConnectIQ Project"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 272 - if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 2:".bold().bright_green(), "Assemble a ConnectIQ Project"); } [INFO] [stdout] 272 + if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} Assemble a ConnectIQ Project", "Step 2:".bold().bright_green()); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/ciq_sdk.rs:48:36 [INFO] [stdout] | [INFO] [stdout] 48 | let mut path = (&*sdk_paths[pos]).to_path_buf(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `&sdk_paths[pos]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:278:98 [INFO] [stdout] | [INFO] [stdout] 278 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 3:".bold().bright_green(), "Compile the app"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 278 - if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 3:".bold().bright_green(), "Compile the app"); } [INFO] [stdout] 278 + if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} Compile the app", "Step 3:".bold().bright_green()); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/prepare_build.rs:31:21 [INFO] [stdout] | [INFO] [stdout] 31 | for resource in vec!["resources/drawables", "resources/layouts", "resources/fonts", "resources/menus", "resources/settings"] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["resources/drawables", "resources/layouts", "resources/fonts", "resources/menus", "resources/settings"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/prepare_build.rs:81:21 [INFO] [stdout] | [INFO] [stdout] 81 | for resource in vec!["drawables", "layouts", "fonts", "menus", "settings"] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["drawables", "layouts", "fonts", "menus", "settings"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:161:21 [INFO] [stdout] | [INFO] [stdout] 161 | io::stdin().read_line(&mut proj_name); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 161 | let _ = io::stdin().read_line(&mut proj_name); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:260:5 [INFO] [stdout] | [INFO] [stdout] 260 | io::stdin().read_line(&mut version); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 260 | let _ = io::stdin().read_line(&mut version); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/prepare_build.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | fs::create_dir("build"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 16 | let _ = fs::create_dir("build"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/prepare_build.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | fs::create_dir("build/tmp"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 17 | let _ = fs::create_dir("build/tmp"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/prepare_build.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | fs::create_dir("build/tmp/source"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 18 | let _ = fs::create_dir("build/tmp/source"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/prepare_build.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | fs::create_dir("build/tmp/resources"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 19 | let _ = fs::create_dir("build/tmp/resources"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/prepare_build.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | for entry in fs::read_dir(PathBuf::from(resource)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(for_loops_over_fallibles)]` on by default [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 32 - for entry in fs::read_dir(PathBuf::from(resource)) { [INFO] [stdout] 32 + while let Ok(entry) = fs::read_dir(PathBuf::from(resource)) { [INFO] [stdout] | [INFO] [stdout] help: consider unwrapping the `Result` with `?` to iterate over its contents [INFO] [stdout] | [INFO] [stdout] 32 | for entry in fs::read_dir(PathBuf::from(resource))? { [INFO] [stdout] | + [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 32 - for entry in fs::read_dir(PathBuf::from(resource)) { [INFO] [stdout] 32 + if let Ok(entry) = fs::read_dir(PathBuf::from(resource)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/prepare_build.rs:119:13 [INFO] [stdout] | [INFO] [stdout] 119 | fs::copy(entry.path(), end_dir.clone()).with_context(|| format!("Failed to copy {:?} to {:?}", entry.path(), end_dir)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 119 | let _ = fs::copy(entry.path(), end_dir.clone()).with_context(|| format!("Failed to copy {:?} to {:?}", entry.path(), end_dir)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/utils/tui/item_selection.rs:20:78 [INFO] [stdout] | [INFO] [stdout] 20 | result.push_str(&*format!("{}", format!("{}) {}", i + 1, items[i].clone()).bold())); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/utils/tui/item_selection.rs:22:64 [INFO] [stdout] | [INFO] [stdout] 22 | result.push_str(&*format!("{}) {}", i + 1, items[i].clone())); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/utils/tui/item_selection.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | io::stdout().execute(terminal::Clear(terminal::ClearType::CurrentLine)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 107 | let _ = io::stdout().execute(terminal::Clear(terminal::ClearType::CurrentLine)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/utils/tui/item_selection.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | io::stdout().execute(cursor::MoveUp(1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 108 | let _ = io::stdout().execute(cursor::MoveUp(1)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:20:78 [INFO] [stdout] | [INFO] [stdout] 20 | result.push_str(&*format!("{}", format!("{}) {}", i + 1, items[i].clone()).bold())); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:22:64 [INFO] [stdout] | [INFO] [stdout] 22 | result.push_str(&*format!("{}) {}", i + 1, items[i].clone())); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | io::stdout().execute(terminal::Clear(terminal::ClearType::CurrentLine)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 107 | let _ = io::stdout().execute(terminal::Clear(terminal::ClearType::CurrentLine)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | io::stdout().execute(cursor::MoveUp(1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 108 | let _ = io::stdout().execute(cursor::MoveUp(1)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/verify_project.rs:90:18 [INFO] [stdout] | [INFO] [stdout] 90 | for entry in fs::read_dir("resources") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 90 - for entry in fs::read_dir("resources") { [INFO] [stdout] 90 + while let Ok(entry) = fs::read_dir("resources") { [INFO] [stdout] | [INFO] [stdout] help: consider unwrapping the `Result` with `?` to iterate over its contents [INFO] [stdout] | [INFO] [stdout] 90 | for entry in fs::read_dir("resources")? { [INFO] [stdout] | + [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 90 - for entry in fs::read_dir("resources") { [INFO] [stdout] 90 + if let Ok(entry) = fs::read_dir("resources") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/verify_project.rs:100:26 [INFO] [stdout] | [INFO] [stdout] 100 | for entry in fs::read_dir(entry.path()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 100 - for entry in fs::read_dir(entry.path()) { [INFO] [stdout] 100 + while let Ok(entry) = fs::read_dir(entry.path()) { [INFO] [stdout] | [INFO] [stdout] help: consider unwrapping the `Result` with `?` to iterate over its contents [INFO] [stdout] | [INFO] [stdout] 100 | for entry in fs::read_dir(entry.path())? { [INFO] [stdout] | + [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 100 - for entry in fs::read_dir(entry.path()) { [INFO] [stdout] 100 + if let Ok(entry) = fs::read_dir(entry.path()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:81:28 [INFO] [stdout] | [INFO] [stdout] 81 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("Building the app..."); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/verify_project.rs:117:19 [INFO] [stdout] | [INFO] [stdout] 117 | fn basename(path: &str, sep: char) -> Cow { [INFO] [stdout] | ^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 117 | fn basename(path: &str, sep: char) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:89:28 [INFO] [stdout] | [INFO] [stdout] 89 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{}", "Successfully built!".bold().bright_green()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:91:28 [INFO] [stdout] | [INFO] [stdout] 91 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Kumitateru does not support building libraries(barrels) at the time. Plea... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:94:28 [INFO] [stdout] | [INFO] [stdout] 94 | ... if !env::var("KMTR_IDE_SILENT").is_ok() { eprintln!("Bad project type specified. Please, set it to \"app\" and leave it alone.... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:76:37 [INFO] [stdout] | [INFO] [stdout] 76 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQManifest` [INFO] [stdout] 77 | #[yaserde(rename = "manifest")] [INFO] [stdout] 78 | struct CIQManifest { [INFO] [stdout] | ----------- `CIQManifest` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:108:28 [INFO] [stdout] | [INFO] [stdout] 108 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("Running the app..."); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:116:28 [INFO] [stdout] | [INFO] [stdout] 116 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 4:".bold().bright_green(), "Run"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:126:28 [INFO] [stdout] | [INFO] [stdout] 126 | if !env::var("KMTR_IDE_SILENT").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:87:37 [INFO] [stdout] | [INFO] [stdout] 87 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQApplication` [INFO] [stdout] 88 | struct CIQApplication { [INFO] [stdout] | -------------- `CIQApplication` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:137:28 [INFO] [stdout] | [INFO] [stdout] 137 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("Packaging the app..."); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:147:28 [INFO] [stdout] | [INFO] [stdout] 147 | if !env::var("KMTR_IDE_SILENT").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQProducts` [INFO] [stdout] 114 | struct CIQProducts { [INFO] [stdout] | ----------- `CIQProducts` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:119:37 [INFO] [stdout] | [INFO] [stdout] 119 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQProduct` [INFO] [stdout] 120 | struct CIQProduct { [INFO] [stdout] | ---------- `CIQProduct` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:125:37 [INFO] [stdout] | [INFO] [stdout] 125 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQPermissions` [INFO] [stdout] 126 | struct CIQPermissions { [INFO] [stdout] | -------------- `CIQPermissions` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:73:54 [INFO] [stdout] | [INFO] [stdout] 73 | let config_struct = parse_config(&*config_str.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `&config_str.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:132:37 [INFO] [stdout] | [INFO] [stdout] 132 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQPermission` [INFO] [stdout] 133 | struct CIQPermission { [INFO] [stdout] | ------------- `CIQPermission` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:74:73 [INFO] [stdout] | [INFO] [stdout] 74 | ... let package_type = toml::from_str::(&*config_str.clone()).with_context(|| "Unable to parse package.toml")?.pac... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `&config_str.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:138:37 [INFO] [stdout] | [INFO] [stdout] 138 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQLanguages` [INFO] [stdout] 139 | struct CIQLanguages { [INFO] [stdout] | ------------ `CIQLanguages` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:144:37 [INFO] [stdout] | [INFO] [stdout] 144 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQDependencies` [INFO] [stdout] 145 | struct CIQDependencies { [INFO] [stdout] | --------------- `CIQDependencies` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:75:40 [INFO] [stdout] | [INFO] [stdout] 75 | if package_type == String::from("app") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `"app"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:149:37 [INFO] [stdout] | [INFO] [stdout] 149 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQDependency` [INFO] [stdout] 150 | struct CIQDependency { [INFO] [stdout] | ------------- `CIQDependency` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:90:47 [INFO] [stdout] | [INFO] [stdout] 90 | } else if package_type == String::from("lib") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `"lib"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:100:54 [INFO] [stdout] | [INFO] [stdout] 100 | let config_struct = parse_config(&*config_str.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `&config_str.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:101:73 [INFO] [stdout] | [INFO] [stdout] 101 | ... let package_type = toml::from_str::(&*config_str.clone()).with_context(|| "Unable to parse package.toml")?.pa... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `&config_str.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:102:40 [INFO] [stdout] | [INFO] [stdout] 102 | if package_type == String::from("app") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `"app"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:116:118 [INFO] [stdout] | [INFO] [stdout] 116 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 4:".bold().bright_green(), "Run"); } [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 116 - if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 4:".bold().bright_green(), "Run"); } [INFO] [stdout] 116 + if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} Run", "Step 4:".bold().bright_green()); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:134:54 [INFO] [stdout] | [INFO] [stdout] 134 | let config_struct = parse_config(&*config_str); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&config_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:135:73 [INFO] [stdout] | [INFO] [stdout] 135 | ... let package_type = toml::from_str::(&*config_str).with_context(|| "Unable to parse package.toml")?.package.pa... [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&config_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:155:21 [INFO] [stdout] | [INFO] [stdout] 155 | let proj_type: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 162 | / proj_type = vec!( [INFO] [stdout] 163 | | "watch-app", [INFO] [stdout] 164 | | "watchface", [INFO] [stdout] 165 | | "datafield", [INFO] [stdout] ... | [INFO] [stdout] 175 | | "Audio content provider" [INFO] [stdout] 176 | | ))? as usize].to_string(); [INFO] [stdout] | |_________________________________________________^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `proj_type` here [INFO] [stdout] | [INFO] [stdout] 155 ~ [INFO] [stdout] 156 | let proj_min_sdk: String; [INFO] [stdout] ... [INFO] [stdout] 161 | io::stdin().read_line(&mut proj_name); [INFO] [stdout] 162 ~ let proj_type: String = vec!( [INFO] [stdout] 163 + "watch-app", [INFO] [stdout] 164 + "watchface", [INFO] [stdout] 165 + "datafield", [INFO] [stdout] 166 + "widget", [INFO] [stdout] 167 + "audio-content-provider" [INFO] [stdout] 168 + )[display_cli_item_selection( [INFO] [stdout] 169 + "Now what type is your app?", [INFO] [stdout] 170 + vec!( [INFO] [stdout] 171 + "App", [INFO] [stdout] 172 + "Watchface", [INFO] [stdout] 173 + "Datafield", [INFO] [stdout] 174 + "Widget", [INFO] [stdout] 175 + "Audio content provider" [INFO] [stdout] 176 ~ ))? as usize].to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:156:21 [INFO] [stdout] | [INFO] [stdout] 156 | let proj_min_sdk: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 178 | proj_min_sdk = get_version(VersionType::MinSDK); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `proj_min_sdk` here [INFO] [stdout] | [INFO] [stdout] 156 ~ [INFO] [stdout] 157 | let proj_target_sdk: String; [INFO] [stdout] ... [INFO] [stdout] 177 | [INFO] [stdout] 178 ~ let proj_min_sdk: String = get_version(VersionType::MinSDK); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:157:21 [INFO] [stdout] | [INFO] [stdout] 157 | let proj_target_sdk: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 180 | proj_target_sdk = get_version(VersionType::TargetSDK); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `proj_target_sdk` here [INFO] [stdout] | [INFO] [stdout] 157 ~ [INFO] [stdout] 158 | let mut proj_signing_key: Option = None; // If none, then a new key should be generated. If some, then it will be imported [INFO] [stdout] ... [INFO] [stdout] 179 | [INFO] [stdout] 180 ~ let proj_target_sdk: String = get_version(VersionType::TargetSDK); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/main.rs:189:24 [INFO] [stdout] | [INFO] [stdout] 189 | if proj_signing_key == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `proj_signing_key.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:265:5 [INFO] [stdout] | [INFO] [stdout] 265 | return version [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] 265 - return version [INFO] [stdout] 265 + version [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:261:32 [INFO] [stdout] | [INFO] [stdout] 261 | if !version_regex.is_match(&*version) { [INFO] [stdout] | ^^^^^^^^^ help: try: `&version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:270:8 [INFO] [stdout] | [INFO] [stdout] 270 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 1:".bold().bright_green(), "Verify project structure"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:272:8 [INFO] [stdout] | [INFO] [stdout] 272 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 2:".bold().bright_green(), "Assemble a ConnectIQ Project"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:277:8 [INFO] [stdout] | [INFO] [stdout] 277 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{}", "Successfully assembled!".bold().bright_green()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:278:8 [INFO] [stdout] | [INFO] [stdout] 278 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 3:".bold().bright_green(), "Compile the app"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `env::var("KMTR_IDE_SILENT").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: deref which would be done by auto-deref [INFO] [stdout] --> src/main.rs:269:40 [INFO] [stdout] | [INFO] [stdout] 269 | let bin_loc = CIQSdk::bin_location(&*config.package.target_sdk)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&config.package.target_sdk` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:270:98 [INFO] [stdout] | [INFO] [stdout] 270 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 1:".bold().bright_green(), "Verify project structure"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 270 - if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 1:".bold().bright_green(), "Verify project structure"); } [INFO] [stdout] 270 + if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} Verify project structure", "Step 1:".bold().bright_green()); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:272:98 [INFO] [stdout] | [INFO] [stdout] 272 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 2:".bold().bright_green(), "Assemble a ConnectIQ Project"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 272 - if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 2:".bold().bright_green(), "Assemble a ConnectIQ Project"); } [INFO] [stdout] 272 + if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} Assemble a ConnectIQ Project", "Step 2:".bold().bright_green()); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:278:98 [INFO] [stdout] | [INFO] [stdout] 278 | if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 3:".bold().bright_green(), "Compile the app"); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 278 - if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} {}", "Step 3:".bold().bright_green(), "Compile the app"); } [INFO] [stdout] 278 + if !env::var("KMTR_IDE_SILENT").is_ok() { println!("{} Compile the app", "Step 3:".bold().bright_green()); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/prepare_build.rs:31:21 [INFO] [stdout] | [INFO] [stdout] 31 | for resource in vec!["resources/drawables", "resources/layouts", "resources/fonts", "resources/menus", "resources/settings"] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["resources/drawables", "resources/layouts", "resources/fonts", "resources/menus", "resources/settings"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/prepare_build.rs:81:21 [INFO] [stdout] | [INFO] [stdout] 81 | for resource in vec!["drawables", "layouts", "fonts", "menus", "settings"] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["drawables", "layouts", "fonts", "menus", "settings"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:161:21 [INFO] [stdout] | [INFO] [stdout] 161 | io::stdin().read_line(&mut proj_name); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 161 | let _ = io::stdin().read_line(&mut proj_name); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:260:5 [INFO] [stdout] | [INFO] [stdout] 260 | io::stdin().read_line(&mut version); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 260 | let _ = io::stdin().read_line(&mut version); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/prepare_build.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | fs::create_dir("build"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 16 | let _ = fs::create_dir("build"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/prepare_build.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | fs::create_dir("build/tmp"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 17 | let _ = fs::create_dir("build/tmp"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/prepare_build.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | fs::create_dir("build/tmp/source"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 18 | let _ = fs::create_dir("build/tmp/source"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/prepare_build.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | fs::create_dir("build/tmp/resources"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 19 | let _ = fs::create_dir("build/tmp/resources"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/prepare_build.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | for entry in fs::read_dir(PathBuf::from(resource)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(for_loops_over_fallibles)]` on by default [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 32 - for entry in fs::read_dir(PathBuf::from(resource)) { [INFO] [stdout] 32 + while let Ok(entry) = fs::read_dir(PathBuf::from(resource)) { [INFO] [stdout] | [INFO] [stdout] help: consider unwrapping the `Result` with `?` to iterate over its contents [INFO] [stdout] | [INFO] [stdout] 32 | for entry in fs::read_dir(PathBuf::from(resource))? { [INFO] [stdout] | + [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 32 - for entry in fs::read_dir(PathBuf::from(resource)) { [INFO] [stdout] 32 + if let Ok(entry) = fs::read_dir(PathBuf::from(resource)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/prepare_build.rs:119:13 [INFO] [stdout] | [INFO] [stdout] 119 | fs::copy(entry.path(), end_dir.clone()).with_context(|| format!("Failed to copy {:?} to {:?}", entry.path(), end_dir)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 119 | let _ = fs::copy(entry.path(), end_dir.clone()).with_context(|| format!("Failed to copy {:?} to {:?}", entry.path(), end_dir)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/utils/tui/item_selection.rs:20:78 [INFO] [stdout] | [INFO] [stdout] 20 | result.push_str(&*format!("{}", format!("{}) {}", i + 1, items[i].clone()).bold())); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/utils/tui/item_selection.rs:22:64 [INFO] [stdout] | [INFO] [stdout] 22 | result.push_str(&*format!("{}) {}", i + 1, items[i].clone())); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/utils/tui/item_selection.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | io::stdout().execute(terminal::Clear(terminal::ClearType::CurrentLine)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 107 | let _ = io::stdout().execute(terminal::Clear(terminal::ClearType::CurrentLine)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/utils/tui/item_selection.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | io::stdout().execute(cursor::MoveUp(1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 108 | let _ = io::stdout().execute(cursor::MoveUp(1)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:20:78 [INFO] [stdout] | [INFO] [stdout] 20 | result.push_str(&*format!("{}", format!("{}) {}", i + 1, items[i].clone()).bold())); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:22:64 [INFO] [stdout] | [INFO] [stdout] 22 | result.push_str(&*format!("{}) {}", i + 1, items[i].clone())); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | io::stdout().execute(terminal::Clear(terminal::ClearType::CurrentLine)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 107 | let _ = io::stdout().execute(terminal::Clear(terminal::ClearType::CurrentLine)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/utils/tui/multiple_selection.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | io::stdout().execute(cursor::MoveUp(1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 108 | let _ = io::stdout().execute(cursor::MoveUp(1)); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/verify_project.rs:90:18 [INFO] [stdout] | [INFO] [stdout] 90 | for entry in fs::read_dir("resources") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 90 - for entry in fs::read_dir("resources") { [INFO] [stdout] 90 + while let Ok(entry) = fs::read_dir("resources") { [INFO] [stdout] | [INFO] [stdout] help: consider unwrapping the `Result` with `?` to iterate over its contents [INFO] [stdout] | [INFO] [stdout] 90 | for entry in fs::read_dir("resources")? { [INFO] [stdout] | + [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 90 - for entry in fs::read_dir("resources") { [INFO] [stdout] 90 + if let Ok(entry) = fs::read_dir("resources") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: for loop over a `Result`. This is more readably written as an `if let` statement [INFO] [stdout] --> src/verify_project.rs:100:26 [INFO] [stdout] | [INFO] [stdout] 100 | for entry in fs::read_dir(entry.path()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 100 - for entry in fs::read_dir(entry.path()) { [INFO] [stdout] 100 + while let Ok(entry) = fs::read_dir(entry.path()) { [INFO] [stdout] | [INFO] [stdout] help: consider unwrapping the `Result` with `?` to iterate over its contents [INFO] [stdout] | [INFO] [stdout] 100 | for entry in fs::read_dir(entry.path())? { [INFO] [stdout] | + [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 100 - for entry in fs::read_dir(entry.path()) { [INFO] [stdout] 100 + if let Ok(entry) = fs::read_dir(entry.path()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/verify_project.rs:117:19 [INFO] [stdout] | [INFO] [stdout] 117 | fn basename(path: &str, sep: char) -> Cow { [INFO] [stdout] | ^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 117 | fn basename(path: &str, sep: char) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:76:37 [INFO] [stdout] | [INFO] [stdout] 76 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQManifest` [INFO] [stdout] 77 | #[yaserde(rename = "manifest")] [INFO] [stdout] 78 | struct CIQManifest { [INFO] [stdout] | ----------- `CIQManifest` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:87:37 [INFO] [stdout] | [INFO] [stdout] 87 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQApplication` [INFO] [stdout] 88 | struct CIQApplication { [INFO] [stdout] | -------------- `CIQApplication` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQProducts` [INFO] [stdout] 114 | struct CIQProducts { [INFO] [stdout] | ----------- `CIQProducts` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:119:37 [INFO] [stdout] | [INFO] [stdout] 119 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQProduct` [INFO] [stdout] 120 | struct CIQProduct { [INFO] [stdout] | ---------- `CIQProduct` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:125:37 [INFO] [stdout] | [INFO] [stdout] 125 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQPermissions` [INFO] [stdout] 126 | struct CIQPermissions { [INFO] [stdout] | -------------- `CIQPermissions` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:132:37 [INFO] [stdout] | [INFO] [stdout] 132 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQPermission` [INFO] [stdout] 133 | struct CIQPermission { [INFO] [stdout] | ------------- `CIQPermission` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:138:37 [INFO] [stdout] | [INFO] [stdout] 138 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQLanguages` [INFO] [stdout] 139 | struct CIQLanguages { [INFO] [stdout] | ------------ `CIQLanguages` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:144:37 [INFO] [stdout] | [INFO] [stdout] 144 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQDependencies` [INFO] [stdout] 145 | struct CIQDependencies { [INFO] [stdout] | --------------- `CIQDependencies` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ser_de/manifest/manifest_utils.rs:149:37 [INFO] [stdout] | [INFO] [stdout] 149 | #[derive(Default, PartialEq, Debug, YaSerialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `YaSerialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_YA_SERIALIZE_FOR_CIQDependency` [INFO] [stdout] 150 | struct CIQDependency { [INFO] [stdout] | ------------- `CIQDependency` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `YaSerialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `YaSerialize` may come from an old version of the `yaserde_derive` crate, try updating your dependency with `cargo update -p yaserde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `YaSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 17.14s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: quick-xml v0.20.0 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 2` [INFO] running `Command { std: "docker" "inspect" "196bb4ba1f030ba02db91d1546055d763ea26211ebe2d3c4e125e9b89a84e2db", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "196bb4ba1f030ba02db91d1546055d763ea26211ebe2d3c4e125e9b89a84e2db", kill_on_drop: false }` [INFO] [stdout] 196bb4ba1f030ba02db91d1546055d763ea26211ebe2d3c4e125e9b89a84e2db