[INFO] cloning repository https://github.com/WarrenHood/NandScript [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/WarrenHood/NandScript" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FWarrenHood%2FNandScript", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FWarrenHood%2FNandScript'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 694155365a0576b6da3b399a6ed0312ccda6fad2 [INFO] linting WarrenHood/NandScript against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FWarrenHood%2FNandScript" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/WarrenHood/NandScript [INFO] finished tweaking git repo https://github.com/WarrenHood/NandScript [INFO] tweaked toml for git repo https://github.com/WarrenHood/NandScript written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/WarrenHood/NandScript on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/WarrenHood/NandScript already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 7f116dddf621ba1c7465c933330a8ad45d541400456eaa40aa1bcae2e69238f2 [INFO] running `Command { std: "docker" "start" "-a" "7f116dddf621ba1c7465c933330a8ad45d541400456eaa40aa1bcae2e69238f2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7f116dddf621ba1c7465c933330a8ad45d541400456eaa40aa1bcae2e69238f2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7f116dddf621ba1c7465c933330a8ad45d541400456eaa40aa1bcae2e69238f2", kill_on_drop: false }` [INFO] [stdout] 7f116dddf621ba1c7465c933330a8ad45d541400456eaa40aa1bcae2e69238f2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 92c9a1a12462b49b492b9acd5feb93c2f4d81f20b005101be40b7bffa1222aba [INFO] running `Command { std: "docker" "start" "-a" "92c9a1a12462b49b492b9acd5feb93c2f4d81f20b005101be40b7bffa1222aba", kill_on_drop: false }` [INFO] [stderr] Checking nandscript v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `BitAnd`, `Not`, `hash::Hash`, and `time::Instant` [INFO] [stdout] --> src/main.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{time::Instant, collections::HashMap, hash::Hash, ops::{BitAnd, Not}}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^ ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `load_chip` is never used [INFO] [stdout] --> src/main.rs:304:8 [INFO] [stdout] | [INFO] [stdout] 299 | impl ChipEvaluator { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 304 | fn load_chip(&mut self, chip_name: &str, code: &Vec) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:36:16 [INFO] [stdout] | [INFO] [stdout] 36 | if currentWord.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!currentWord.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: length comparison to zero [INFO] [stdout] --> src/main.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | if currentWord.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!currentWord.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:91:24 [INFO] [stdout] | [INFO] [stdout] 91 | if result.len() == 0 || match result.last().unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `result.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] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:113:49 [INFO] [stdout] | [INFO] [stdout] 113 | result.push(Token::Chip(x.into())); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `x` [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: manual case-insensitive ASCII comparison [INFO] [stdout] --> src/main.rs:125:29 [INFO] [stdout] | [INFO] [stdout] 125 | else if tok.to_ascii_lowercase() == "false" || tok == "0" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp [INFO] [stdout] = note: `#[warn(clippy::manual_ignore_case_cmp)]` on by default [INFO] [stdout] help: consider using `.eq_ignore_ascii_case()` instead [INFO] [stdout] | [INFO] [stdout] 125 - else if tok.to_ascii_lowercase() == "false" || tok == "0" { [INFO] [stdout] 125 + else if tok.eq_ignore_ascii_case("false") || tok == "0" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:145:16 [INFO] [stdout] | [INFO] [stdout] 145 | if current_tokens.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_tokens.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] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/main.rs:161:55 [INFO] [stdout] | [INFO] [stdout] 161 | current_tokens.push(Token::ChipIO(x.split('.').nth(0).unwrap().into(), x.split('.').nth(1).unwrap().into())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `x.split('.').next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:172:8 [INFO] [stdout] | [INFO] [stdout] 172 | if current_tokens.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_tokens.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] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/main.rs:186:47 [INFO] [stdout] | [INFO] [stdout] 186 | result.push(Token::ChipIO(x.split('.').nth(0).unwrap().into(), x.split('.').nth(1).unwrap().into())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `x.split('.').next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:280:5 [INFO] [stdout] | [INFO] [stdout] 280 | return Token::Expression(input_expressions); [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] 280 - return Token::Expression(input_expressions); [INFO] [stdout] 280 + Token::Expression(input_expressions) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/main.rs:214:49 [INFO] [stdout] | [INFO] [stdout] 214 | Token::Input(x) => return Token::IO(x.split(':').nth(0).unwrap().into(), x.split(':').nth(1).unwrap().into()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `x.split(':').next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/main.rs:275:30 [INFO] [stdout] | [INFO] [stdout] 275 | return Token::IO(x.split(':').nth(0).unwrap().into(), x.split(':').nth(1).unwrap().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `x.split(':').next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:284:36 [INFO] [stdout] | [INFO] [stdout] 284 | lex_final(&lex2(&lex(&tokenize(&code)))) [INFO] [stdout] | ^^^^^ help: change this to: `code` [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: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/main.rs:288:14 [INFO] [stdout] | [INFO] [stdout] 288 | *out.get(out.keys().nth(0).unwrap()).unwrap_or(&0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `out.keys().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:304:52 [INFO] [stdout] | [INFO] [stdout] 304 | fn load_chip(&mut self, chip_name: &str, code: &Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 304 ~ fn load_chip(&mut self, chip_name: &str, code: &[Token]) { [INFO] [stdout] 305 ~ self.chips.insert(chip_name.to_string(), code.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:323:15 [INFO] [stdout] | [INFO] [stdout] 323 | while !current_token.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `current_token.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/main.rs:331:68 [INFO] [stdout] | [INFO] [stdout] 331 | Token::True => {output.insert(String::from("OUT"), 1 as u8);}, [INFO] [stdout] | ^^^^^^^ help: try: `1_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/main.rs:332:69 [INFO] [stdout] | [INFO] [stdout] 332 | Token::False => {output.insert(String::from("OUT"), 0 as u8);}, [INFO] [stdout] | ^^^^^^^ help: try: `0_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:341:51 [INFO] [stdout] | [INFO] [stdout] 341 | let mut current_input_param = 'a' as u8; [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `current_input_param` is used as a loop counter [INFO] [stdout] --> src/main.rs:342:21 [INFO] [stdout] | [INFO] [stdout] 342 | for input_token in ec_iter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (current_input_param, input_token) in ('a' as u8..).zip(ec_iter)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:349:133 [INFO] [stdout] | [INFO] [stdout] 349 | ...get_first_output(&self.eval(i_toks.to_vec(), &inputs))); [INFO] [stdout] | ^^^^^^^ help: change this to: `inputs` [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: length comparison to zero [INFO] [stdout] --> src/main.rs:360:32 [INFO] [stdout] | [INFO] [stdout] 360 | ... if current_out_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_out_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:372:32 [INFO] [stdout] | [INFO] [stdout] 372 | ... if current_out_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_out_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:387:32 [INFO] [stdout] | [INFO] [stdout] 387 | ... if current_out_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_out_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:399:32 [INFO] [stdout] | [INFO] [stdout] 399 | ... if current_out_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_out_name.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] [INFO] [stdout] [INFO] [stdout] warning: variable `currentWord` should have a snake case name [INFO] [stdout] --> src/main.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut currentWord: String = String::new(); [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `current_word` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `isComment` should have a snake case name [INFO] [stdout] --> src/main.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut isComment = false; [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `is_comment` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `hasOutput` should have a snake case name [INFO] [stdout] --> src/main.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | let mut hasOutput = false; [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `has_output` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BitAnd`, `Not`, `hash::Hash`, and `time::Instant` [INFO] [stdout] --> src/main.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{time::Instant, collections::HashMap, hash::Hash, ops::{BitAnd, Not}}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^ ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `parenCount` should have a snake case name [INFO] [stdout] --> src/main.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | let mut parenCount = 0; [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `paren_count` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `NAND` should have a snake case name [INFO] [stdout] --> src/main.rs:309:4 [INFO] [stdout] | [INFO] [stdout] 309 | fn NAND(inputs: &HashMap) -> HashMap { [INFO] [stdout] | ^^^^ help: convert the identifier to snake case: `nand` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `load_chip` is never used [INFO] [stdout] --> src/main.rs:304:8 [INFO] [stdout] | [INFO] [stdout] 299 | impl ChipEvaluator { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 304 | fn load_chip(&mut self, chip_name: &str, code: &Vec) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:36:16 [INFO] [stdout] | [INFO] [stdout] 36 | if currentWord.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!currentWord.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: length comparison to zero [INFO] [stdout] --> src/main.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | if currentWord.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!currentWord.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:91:24 [INFO] [stdout] | [INFO] [stdout] 91 | if result.len() == 0 || match result.last().unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `result.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] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:113:49 [INFO] [stdout] | [INFO] [stdout] 113 | result.push(Token::Chip(x.into())); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `x` [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: manual case-insensitive ASCII comparison [INFO] [stdout] --> src/main.rs:125:29 [INFO] [stdout] | [INFO] [stdout] 125 | else if tok.to_ascii_lowercase() == "false" || tok == "0" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp [INFO] [stdout] = note: `#[warn(clippy::manual_ignore_case_cmp)]` on by default [INFO] [stdout] help: consider using `.eq_ignore_ascii_case()` instead [INFO] [stdout] | [INFO] [stdout] 125 - else if tok.to_ascii_lowercase() == "false" || tok == "0" { [INFO] [stdout] 125 + else if tok.eq_ignore_ascii_case("false") || tok == "0" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:145:16 [INFO] [stdout] | [INFO] [stdout] 145 | if current_tokens.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_tokens.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] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/main.rs:161:55 [INFO] [stdout] | [INFO] [stdout] 161 | current_tokens.push(Token::ChipIO(x.split('.').nth(0).unwrap().into(), x.split('.').nth(1).unwrap().into())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `x.split('.').next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:172:8 [INFO] [stdout] | [INFO] [stdout] 172 | if current_tokens.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_tokens.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] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/main.rs:186:47 [INFO] [stdout] | [INFO] [stdout] 186 | result.push(Token::ChipIO(x.split('.').nth(0).unwrap().into(), x.split('.').nth(1).unwrap().into())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `x.split('.').next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:280:5 [INFO] [stdout] | [INFO] [stdout] 280 | return Token::Expression(input_expressions); [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] 280 - return Token::Expression(input_expressions); [INFO] [stdout] 280 + Token::Expression(input_expressions) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/main.rs:214:49 [INFO] [stdout] | [INFO] [stdout] 214 | Token::Input(x) => return Token::IO(x.split(':').nth(0).unwrap().into(), x.split(':').nth(1).unwrap().into()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `x.split(':').next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/main.rs:275:30 [INFO] [stdout] | [INFO] [stdout] 275 | return Token::IO(x.split(':').nth(0).unwrap().into(), x.split(':').nth(1).unwrap().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `x.split(':').next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:284:36 [INFO] [stdout] | [INFO] [stdout] 284 | lex_final(&lex2(&lex(&tokenize(&code)))) [INFO] [stdout] | ^^^^^ help: change this to: `code` [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: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/main.rs:288:14 [INFO] [stdout] | [INFO] [stdout] 288 | *out.get(out.keys().nth(0).unwrap()).unwrap_or(&0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `out.keys().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:304:52 [INFO] [stdout] | [INFO] [stdout] 304 | fn load_chip(&mut self, chip_name: &str, code: &Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 304 ~ fn load_chip(&mut self, chip_name: &str, code: &[Token]) { [INFO] [stdout] 305 ~ self.chips.insert(chip_name.to_string(), code.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:323:15 [INFO] [stdout] | [INFO] [stdout] 323 | while !current_token.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `current_token.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/main.rs:331:68 [INFO] [stdout] | [INFO] [stdout] 331 | Token::True => {output.insert(String::from("OUT"), 1 as u8);}, [INFO] [stdout] | ^^^^^^^ help: try: `1_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/main.rs:332:69 [INFO] [stdout] | [INFO] [stdout] 332 | Token::False => {output.insert(String::from("OUT"), 0 as u8);}, [INFO] [stdout] | ^^^^^^^ help: try: `0_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/main.rs:341:51 [INFO] [stdout] | [INFO] [stdout] 341 | let mut current_input_param = 'a' as u8; [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `current_input_param` is used as a loop counter [INFO] [stdout] --> src/main.rs:342:21 [INFO] [stdout] | [INFO] [stdout] 342 | for input_token in ec_iter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (current_input_param, input_token) in ('a' as u8..).zip(ec_iter)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:349:133 [INFO] [stdout] | [INFO] [stdout] 349 | ...get_first_output(&self.eval(i_toks.to_vec(), &inputs))); [INFO] [stdout] | ^^^^^^^ help: change this to: `inputs` [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: length comparison to zero [INFO] [stdout] --> src/main.rs:360:32 [INFO] [stdout] | [INFO] [stdout] 360 | ... if current_out_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_out_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:372:32 [INFO] [stdout] | [INFO] [stdout] 372 | ... if current_out_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_out_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:387:32 [INFO] [stdout] | [INFO] [stdout] 387 | ... if current_out_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_out_name.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:399:32 [INFO] [stdout] | [INFO] [stdout] 399 | ... if current_out_name.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_out_name.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] [INFO] [stdout] [INFO] [stdout] warning: variable `currentWord` should have a snake case name [INFO] [stdout] --> src/main.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut currentWord: String = String::new(); [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `current_word` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `isComment` should have a snake case name [INFO] [stdout] --> src/main.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut isComment = false; [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `is_comment` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `hasOutput` should have a snake case name [INFO] [stdout] --> src/main.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | let mut hasOutput = false; [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `has_output` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `parenCount` should have a snake case name [INFO] [stdout] --> src/main.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | let mut parenCount = 0; [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `paren_count` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `NAND` should have a snake case name [INFO] [stdout] --> src/main.rs:309:4 [INFO] [stdout] | [INFO] [stdout] 309 | fn NAND(inputs: &HashMap) -> HashMap { [INFO] [stdout] | ^^^^ help: convert the identifier to snake case: `nand` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.33s [INFO] running `Command { std: "docker" "inspect" "92c9a1a12462b49b492b9acd5feb93c2f4d81f20b005101be40b7bffa1222aba", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "92c9a1a12462b49b492b9acd5feb93c2f4d81f20b005101be40b7bffa1222aba", kill_on_drop: false }` [INFO] [stdout] 92c9a1a12462b49b492b9acd5feb93c2f4d81f20b005101be40b7bffa1222aba