[INFO] cloning repository https://github.com/rinsane/reflex-rison [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/rinsane/reflex-rison" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frinsane%2Freflex-rison", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frinsane%2Freflex-rison'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5eb002db50e2b855fd4bf0deef0dc787032f2d86 [INFO] linting rinsane/reflex-rison against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frinsane%2Freflex-rison" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/rinsane/reflex-rison [INFO] finished tweaking git repo https://github.com/rinsane/reflex-rison [INFO] tweaked toml for git repo https://github.com/rinsane/reflex-rison written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/rinsane/reflex-rison 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/rinsane/reflex-rison 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-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 919b0112c51fb3b44c450f61dbb33cde0dd8f923c2d10dfdc46e32ce4f6ec930 [INFO] running `Command { std: "docker" "start" "-a" "919b0112c51fb3b44c450f61dbb33cde0dd8f923c2d10dfdc46e32ce4f6ec930", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "919b0112c51fb3b44c450f61dbb33cde0dd8f923c2d10dfdc46e32ce4f6ec930", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "919b0112c51fb3b44c450f61dbb33cde0dd8f923c2d10dfdc46e32ce4f6ec930", kill_on_drop: false }` [INFO] [stdout] 919b0112c51fb3b44c450f61dbb33cde0dd8f923c2d10dfdc46e32ce4f6ec930 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 2de6883f268f1e2a2e33c29afdc18798242b2de533ead031fa8aabd6e01e181e [INFO] running `Command { std: "docker" "start" "-a" "2de6883f268f1e2a2e33c29afdc18798242b2de533ead031fa8aabd6e01e181e", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.153 [INFO] [stderr] Checking getrandom v0.2.14 [INFO] [stderr] Checking term_size v0.3.2 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking reflex-rison v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lexer.rs:58:23 [INFO] [stdout] | [INFO] [stdout] 58 | while true && tr < cv.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `tr < cv.len()` [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/lexer.rs:79:23 [INFO] [stdout] | [INFO] [stdout] 79 | while true && tr < cv.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `tr < cv.len()` [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/lexer.rs:107:27 [INFO] [stdout] | [INFO] [stdout] 107 | while true && tr < cv.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `tr < cv.len()` [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/lexer.rs:123:27 [INFO] [stdout] | [INFO] [stdout] 123 | while true && tr <= cv.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `tr <= cv.len()` [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/lexer.rs:152:31 [INFO] [stdout] | [INFO] [stdout] 152 | while true && tr <= cv.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `tr <= cv.len()` [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/lexer.rs:170:23 [INFO] [stdout] | [INFO] [stdout] 170 | while true && tr <= cv.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `tr <= cv.len()` [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/lexer.rs:210:5 [INFO] [stdout] | [INFO] [stdout] 210 | return tokens; [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] 210 - return tokens; [INFO] [stdout] 210 + tokens [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/lexer.rs:61:48 [INFO] [stdout] | [INFO] [stdout] 61 | } else if cv[tr] == '.' && onepoint == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `!onepoint` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lexer.rs:99:21 [INFO] [stdout] | [INFO] [stdout] 99 | s = s + 3; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `s += 3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/parseTree.rs:8:15 [INFO] [stdout] | [INFO] [stdout] 8 | children: Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] = note: `#[warn(clippy::vec_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parseTree.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | return Option::None; [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] 23 - return Option::None; [INFO] [stdout] 23 + Option::None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/parseTree.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let top = stack.pop().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 14 ~ while let Some(top) = stack.pop() { [INFO] [stdout] 15 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/parseTree.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | if (*top).val == val { [INFO] [stdout] | ^^^^^^ help: try: `top` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/parseTree.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | tokens: &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] 61 - tokens: &Vec, [INFO] [stdout] 61 + tokens: &[Token], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/parseTree.rs:62:18 [INFO] [stdout] | [INFO] [stdout] 62 | final_rules: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 62 - final_rules: &mut Vec>, [INFO] [stdout] 62 + final_rules: &mut [Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/parseTree.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | T: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 63 - T: &Vec>, [INFO] [stdout] 63 + T: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/parseTree.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | / if (*no).0 == eof { [INFO] [stdout] 86 | | false [INFO] [stdout] 87 | | } else { [INFO] [stdout] 88 | | true [INFO] [stdout] 89 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `(*no).0 != eof` [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: deref which would be done by auto-deref [INFO] [stdout] --> src/parseTree.rs:85:16 [INFO] [stdout] | [INFO] [stdout] 85 | if (*no).0 == eof { [INFO] [stdout] | ^^^^^ help: try: `no` [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: the function `print_treee` doesn't need a mutable reference [INFO] [stdout] --> src/parseTree.rs:140:17 [INFO] [stdout] | [INFO] [stdout] 140 | print_treee(&mut parseTree, Colour::Red, String::new(), true, &rm); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 140 - print_treee(&mut parseTree, Colour::Red, String::new(), true, &rm); [INFO] [stdout] 140 + print_treee(&parseTree, Colour::Red, String::new(), true, &rm); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/table_setup/file_io.rs:15:27 [INFO] [stdout] | [INFO] [stdout] 15 | for line in lines.flatten() { [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/table_setup/file_io.rs:15:21 [INFO] [stdout] | [INFO] [stdout] 15 | for line in lines.flatten() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] = note: `#[warn(clippy::lines_filter_map_ok)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup/file_io.rs:19:32 [INFO] [stdout] | [INFO] [stdout] 19 | for (_i, st) in text.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 19 - for (_i, st) in text.iter().enumerate() { [INFO] [stdout] 19 + for st in text.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup/file_io.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | rules: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 44 - rules: &mut Vec>>, [INFO] [stdout] 44 + rules: &mut [Vec>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/table_setup/file_io.rs:50:27 [INFO] [stdout] | [INFO] [stdout] 50 | for line in lines.flatten() { [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/table_setup/file_io.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | for line in lines.flatten() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `clone` on a `Copy` type [INFO] [stdout] --> src/table_setup.rs:17:29 [INFO] [stdout] | [INFO] [stdout] 17 | fn clone(&self) -> Self { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 18 | | match self { [INFO] [stdout] 19 | | SymbolType::Terminal => SymbolType::Terminal, [INFO] [stdout] 20 | | SymbolType::NonTerminal => SymbolType::NonTerminal, [INFO] [stdout] ... | [INFO] [stdout] 23 | | } [INFO] [stdout] | |_____^ help: change this to: `{ *self }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_clone_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function cannot return without recursing [INFO] [stdout] --> src/table_setup.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / fn eq(&self, other: &Self) -> bool { [INFO] [stdout] 29 | | self == other [INFO] [stdout] 30 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: recursive call site [INFO] [stdout] --> src/table_setup.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | self == other [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion [INFO] [stdout] = note: `#[warn(clippy::unconditional_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/table_setup.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 43 | | Vec, [INFO] [stdout] 44 | | Vec, [INFO] [stdout] 45 | | HashMap, [INFO] [stdout] ... | [INFO] [stdout] 49 | | usize, [INFO] [stdout] 50 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/table_setup.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | / return ( [INFO] [stdout] 143 | | terminals, [INFO] [stdout] 144 | | non_terminals, [INFO] [stdout] 145 | | map, [INFO] [stdout] ... | [INFO] [stdout] 149 | | count, [INFO] [stdout] 150 | | ); [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] 142 ~ ( [INFO] [stdout] 143 + terminals, [INFO] [stdout] 144 + non_terminals, [INFO] [stdout] 145 + map, [INFO] [stdout] 146 + rules, [INFO] [stdout] 147 + nullables, [INFO] [stdout] 148 + terminal_indices, [INFO] [stdout] 149 + count, [INFO] [stdout] 150 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `file_io::load_Production_Rules` doesn't need a mutable reference [INFO] [stdout] --> src/table_setup.rs:85:67 [INFO] [stdout] | [INFO] [stdout] 85 | file_io::load_Production_Rules(&production_rules.to_string(), &mut map, &mut rules); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 85 - file_io::load_Production_Rules(&production_rules.to_string(), &mut map, &mut rules); [INFO] [stdout] 85 + file_io::load_Production_Rules(&production_rules.to_string(), &map, &mut rules); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup.rs:96:41 [INFO] [stdout] | [INFO] [stdout] 96 | for (_, inner_val) in val.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 96 - for (_, inner_val) in val.iter().enumerate() { [INFO] [stdout] 96 + for inner_val in val.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:159:16 [INFO] [stdout] | [INFO] [stdout] 159 | terminals: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 159 - terminals: &mut Vec, [INFO] [stdout] 159 + terminals: &mut [Symbol], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup.rs:163:53 [INFO] [stdout] | [INFO] [stdout] 163 | for (_, val) in rules[index as usize].iter_mut().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 163 - for (_, val) in rules[index as usize].iter_mut().enumerate() { [INFO] [stdout] 163 + for val in rules[index as usize].iter_mut() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup.rs:183:36 [INFO] [stdout] | [INFO] [stdout] 183 | for (_, val) in beta.iter_mut().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 183 - for (_, val) in beta.iter_mut().enumerate() { [INFO] [stdout] 183 + for val in beta.iter_mut() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/table_setup.rs:189:11 [INFO] [stdout] | [INFO] [stdout] 189 | rules[rul_ind as usize].push(vec![map[&"Null".to_string()[..]]]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `{ rul_ind }` [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: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup.rs:190:37 [INFO] [stdout] | [INFO] [stdout] 190 | for (_, val) in alpha.iter_mut().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 190 - for (_, val) in alpha.iter_mut().enumerate() { [INFO] [stdout] 190 + for val in alpha.iter_mut() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/table_setup.rs:192:15 [INFO] [stdout] | [INFO] [stdout] 192 | rules[rul_ind as usize].push(val.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `{ rul_ind }` [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: this boolean expression can be simplified [INFO] [stdout] --> src/lexer.rs:58:23 [INFO] [stdout] | [INFO] [stdout] 58 | while true && tr < cv.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `tr < cv.len()` [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/lexer.rs:79:23 [INFO] [stdout] | [INFO] [stdout] 79 | while true && tr < cv.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `tr < cv.len()` [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/lexer.rs:107:27 [INFO] [stdout] | [INFO] [stdout] 107 | while true && tr < cv.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `tr < cv.len()` [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/lexer.rs:123:27 [INFO] [stdout] | [INFO] [stdout] 123 | while true && tr <= cv.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `tr <= cv.len()` [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/lexer.rs:152:31 [INFO] [stdout] | [INFO] [stdout] 152 | while true && tr <= cv.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `tr <= cv.len()` [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/lexer.rs:170:23 [INFO] [stdout] | [INFO] [stdout] 170 | while true && tr <= cv.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `tr <= cv.len()` [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/table_setup.rs:284:5 [INFO] [stdout] | [INFO] [stdout] 284 | return First; [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] 284 - return First; [INFO] [stdout] 284 + First [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:210:5 [INFO] [stdout] | [INFO] [stdout] 210 | return tokens; [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] 210 - return tokens; [INFO] [stdout] 210 + tokens [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:198:16 [INFO] [stdout] | [INFO] [stdout] 198 | terminals: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 198 - terminals: &mut Vec, [INFO] [stdout] 198 + terminals: &mut [Symbol], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/lexer.rs:61:48 [INFO] [stdout] | [INFO] [stdout] 61 | } else if cv[tr] == '.' && onepoint == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `!onepoint` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap` [INFO] [stdout] --> src/table_setup.rs:210:33 [INFO] [stdout] | [INFO] [stdout] 210 | let mut pairs: Vec<_> = map.into_iter().collect(); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/table_setup.rs:213:24 [INFO] [stdout] | [INFO] [stdout] 213 | pairs.sort_by_key(|&(_, ref index)| **index); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 213 - pairs.sort_by_key(|&(_, ref index)| **index); [INFO] [stdout] 213 + pairs.sort_by_key(|(_, index)| **index); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/table_setup.rs:213:29 [INFO] [stdout] | [INFO] [stdout] 213 | pairs.sort_by_key(|&(_, ref index)| **index); [INFO] [stdout] | ^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 213 - pairs.sort_by_key(|&(_, ref index)| **index); [INFO] [stdout] 213 + pairs.sort_by_key(|&(_, index)| *index); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lexer.rs:99:21 [INFO] [stdout] | [INFO] [stdout] 99 | s = s + 3; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `s += 3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/parseTree.rs:8:15 [INFO] [stdout] | [INFO] [stdout] 8 | children: Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] = note: `#[warn(clippy::vec_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/table_setup.rs:287:1 [INFO] [stdout] | [INFO] [stdout] 287 | / fn first( [INFO] [stdout] 288 | | index: usize, [INFO] [stdout] 289 | | First: &mut Vec>, [INFO] [stdout] 290 | | progress: &mut Vec, [INFO] [stdout] ... | [INFO] [stdout] 297 | | rm: &HashMap, [INFO] [stdout] 298 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parseTree.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | return Option::None; [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] 23 - return Option::None; [INFO] [stdout] 23 + Option::None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/parseTree.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let top = stack.pop().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 14 ~ while let Some(top) = stack.pop() { [INFO] [stdout] 15 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/parseTree.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | if (*top).val == val { [INFO] [stdout] | ^^^^^^ help: try: `top` [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: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:318:32 [INFO] [stdout] | [INFO] [stdout] 318 | ans.insert(token.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:326:70 [INFO] [stdout] | [INFO] [stdout] 326 | ... writeln!(fi, "Un null {}", non_terminals[token.clone() as usize].name) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:331:29 [INFO] [stdout] | [INFO] [stdout] 331 | ... token.clone() as usize, [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:342:42 [INFO] [stdout] | [INFO] [stdout] 342 | ans.extend(First[token.clone() as usize].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:347:67 [INFO] [stdout] | [INFO] [stdout] 347 | ... writeln!(fi, "Null {}", non_terminals[token.clone() as usize].name) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/parseTree.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | tokens: &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] 61 - tokens: &Vec, [INFO] [stdout] 61 + tokens: &[Token], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/parseTree.rs:62:18 [INFO] [stdout] | [INFO] [stdout] 62 | final_rules: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 62 - final_rules: &mut Vec>, [INFO] [stdout] 62 + final_rules: &mut [Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/parseTree.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | T: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 63 - T: &Vec>, [INFO] [stdout] 63 + T: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:352:29 [INFO] [stdout] | [INFO] [stdout] 352 | ... token.clone() as usize, [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:363:42 [INFO] [stdout] | [INFO] [stdout] 363 | ans.extend(First[token.clone() as usize].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/parseTree.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | / if (*no).0 == eof { [INFO] [stdout] 86 | | false [INFO] [stdout] 87 | | } else { [INFO] [stdout] 88 | | true [INFO] [stdout] 89 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `(*no).0 != eof` [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: deref which would be done by auto-deref [INFO] [stdout] --> src/parseTree.rs:85:16 [INFO] [stdout] | [INFO] [stdout] 85 | if (*no).0 == eof { [INFO] [stdout] | ^^^^^ help: try: `no` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:383:12 [INFO] [stdout] | [INFO] [stdout] 383 | rules: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 383 - rules: &mut Vec>>, [INFO] [stdout] 383 + rules: &mut [Vec>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/table_setup.rs:392:83 [INFO] [stdout] | [INFO] [stdout] 392 | if terminal_indices.contains(j) && map[&"Null".to_string()] != *j { [INFO] [stdout] | ___________________________________________________________________________________^ [INFO] [stdout] 393 | | n_ulls = false; [INFO] [stdout] 394 | | break; [INFO] [stdout] 395 | | } else if !terminal_indices.contains(j) && !nullables.contains(j) { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/table_setup.rs:395:83 [INFO] [stdout] | [INFO] [stdout] 395 | } else if !terminal_indices.contains(j) && !nullables.contains(j) { [INFO] [stdout] | ___________________________________________________________________________________^ [INFO] [stdout] 396 | | n_ulls = false; [INFO] [stdout] 397 | | break; [INFO] [stdout] 398 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `print_treee` doesn't need a mutable reference [INFO] [stdout] --> src/parseTree.rs:140:17 [INFO] [stdout] | [INFO] [stdout] 140 | print_treee(&mut parseTree, Colour::Red, String::new(), true, &rm); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 140 - print_treee(&mut parseTree, Colour::Red, String::new(), true, &rm); [INFO] [stdout] 140 + print_treee(&parseTree, Colour::Red, String::new(), true, &rm); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/table_setup.rs:483:5 [INFO] [stdout] | [INFO] [stdout] 483 | return Follow; [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] 483 - return Follow; [INFO] [stdout] 483 + Follow [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:413:16 [INFO] [stdout] | [INFO] [stdout] 413 | terminals: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 413 - terminals: &mut Vec, [INFO] [stdout] 413 + terminals: &mut [Symbol], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:414:20 [INFO] [stdout] | [INFO] [stdout] 414 | non_terminals: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 414 - non_terminals: &mut Vec, [INFO] [stdout] 414 + non_terminals: &mut [Symbol], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `HashMap` [INFO] [stdout] --> src/table_setup.rs:428:33 [INFO] [stdout] | [INFO] [stdout] 428 | let mut pairs: Vec<_> = map.into_iter().collect(); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter_mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/table_setup.rs:430:24 [INFO] [stdout] | [INFO] [stdout] 430 | pairs.sort_by_key(|&(_, ref index)| **index); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 430 - pairs.sort_by_key(|&(_, ref index)| **index); [INFO] [stdout] 430 + pairs.sort_by_key(|(_, index)| **index); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/table_setup/file_io.rs:15:27 [INFO] [stdout] | [INFO] [stdout] 15 | for line in lines.flatten() { [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/table_setup/file_io.rs:15:21 [INFO] [stdout] | [INFO] [stdout] 15 | for line in lines.flatten() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] = note: `#[warn(clippy::lines_filter_map_ok)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup/file_io.rs:19:32 [INFO] [stdout] | [INFO] [stdout] 19 | for (_i, st) in text.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 19 - for (_i, st) in text.iter().enumerate() { [INFO] [stdout] 19 + for st in text.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup/file_io.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | rules: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 44 - rules: &mut Vec>>, [INFO] [stdout] 44 + rules: &mut [Vec>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup.rs:502:48 [INFO] [stdout] | [INFO] [stdout] 502 | for (_uu, production) in val.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 502 - for (_uu, production) in val.iter().enumerate() { [INFO] [stdout] 502 + for production in val.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/table_setup/file_io.rs:50:27 [INFO] [stdout] | [INFO] [stdout] 50 | for line in lines.flatten() { [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/table_setup/file_io.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | for line in lines.flatten() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `clone` on a `Copy` type [INFO] [stdout] --> src/table_setup.rs:17:29 [INFO] [stdout] | [INFO] [stdout] 17 | fn clone(&self) -> Self { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 18 | | match self { [INFO] [stdout] 19 | | SymbolType::Terminal => SymbolType::Terminal, [INFO] [stdout] 20 | | SymbolType::NonTerminal => SymbolType::NonTerminal, [INFO] [stdout] ... | [INFO] [stdout] 23 | | } [INFO] [stdout] | |_____^ help: change this to: `{ *self }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_clone_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function cannot return without recursing [INFO] [stdout] --> src/table_setup.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / fn eq(&self, other: &Self) -> bool { [INFO] [stdout] 29 | | self == other [INFO] [stdout] 30 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: recursive call site [INFO] [stdout] --> src/table_setup.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | self == other [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion [INFO] [stdout] = note: `#[warn(clippy::unconditional_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/table_setup.rs:567:1 [INFO] [stdout] | [INFO] [stdout] 567 | / pub fn table_maker( [INFO] [stdout] 568 | | terminals: &mut Vec, [INFO] [stdout] 569 | | rules: &mut Vec>>, [INFO] [stdout] 570 | | First: &mut Vec>, [INFO] [stdout] ... | [INFO] [stdout] 575 | | count: i32, [INFO] [stdout] 576 | | ) -> (Vec>, Vec>) { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/table_setup.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 43 | | Vec, [INFO] [stdout] 44 | | Vec, [INFO] [stdout] 45 | | HashMap, [INFO] [stdout] ... | [INFO] [stdout] 49 | | usize, [INFO] [stdout] 50 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:568:16 [INFO] [stdout] | [INFO] [stdout] 568 | terminals: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 568 - terminals: &mut Vec, [INFO] [stdout] 568 + terminals: &mut [Symbol], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:569:12 [INFO] [stdout] | [INFO] [stdout] 569 | rules: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 569 - rules: &mut Vec>>, [INFO] [stdout] 569 + rules: &mut [Vec>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:570:12 [INFO] [stdout] | [INFO] [stdout] 570 | First: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 570 - First: &mut Vec>, [INFO] [stdout] 570 + First: &mut [HashSet], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:571:13 [INFO] [stdout] | [INFO] [stdout] 571 | Follow: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 571 - Follow: &mut Vec>, [INFO] [stdout] 571 + Follow: &mut [HashSet], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/table_setup.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | / return ( [INFO] [stdout] 143 | | terminals, [INFO] [stdout] 144 | | non_terminals, [INFO] [stdout] 145 | | map, [INFO] [stdout] ... | [INFO] [stdout] 149 | | count, [INFO] [stdout] 150 | | ); [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] 142 ~ ( [INFO] [stdout] 143 + terminals, [INFO] [stdout] 144 + non_terminals, [INFO] [stdout] 145 + map, [INFO] [stdout] 146 + rules, [INFO] [stdout] 147 + nullables, [INFO] [stdout] 148 + terminal_indices, [INFO] [stdout] 149 + count, [INFO] [stdout] 150 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/table_setup.rs:604:48 [INFO] [stdout] | [INFO] [stdout] 604 | if map[&"Null".to_string()] != *iti as i32 { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `*iti` [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: the function `file_io::load_Production_Rules` doesn't need a mutable reference [INFO] [stdout] --> src/table_setup.rs:85:67 [INFO] [stdout] | [INFO] [stdout] 85 | file_io::load_Production_Rules(&production_rules.to_string(), &mut map, &mut rules); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 85 - file_io::load_Production_Rules(&production_rules.to_string(), &mut map, &mut rules); [INFO] [stdout] 85 + file_io::load_Production_Rules(&production_rules.to_string(), &map, &mut rules); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup.rs:621:48 [INFO] [stdout] | [INFO] [stdout] 621 | for (_k, value) in inner_vec.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 621 - for (_k, value) in inner_vec.iter().enumerate() { [INFO] [stdout] 621 + for value in inner_vec.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup.rs:96:41 [INFO] [stdout] | [INFO] [stdout] 96 | for (_, inner_val) in val.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 96 - for (_, inner_val) in val.iter().enumerate() { [INFO] [stdout] 96 + for inner_val in val.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/table_setup.rs:622:84 [INFO] [stdout] | [INFO] [stdout] 622 | if terminal_indices.contains(value) && map[&"Null".to_string()] != *value as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `*value` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:159:16 [INFO] [stdout] | [INFO] [stdout] 159 | terminals: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 159 - terminals: &mut Vec, [INFO] [stdout] 159 + terminals: &mut [Symbol], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup.rs:163:53 [INFO] [stdout] | [INFO] [stdout] 163 | for (_, val) in rules[index as usize].iter_mut().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 163 - for (_, val) in rules[index as usize].iter_mut().enumerate() { [INFO] [stdout] 163 + for val in rules[index as usize].iter_mut() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup.rs:183:36 [INFO] [stdout] | [INFO] [stdout] 183 | for (_, val) in beta.iter_mut().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 183 - for (_, val) in beta.iter_mut().enumerate() { [INFO] [stdout] 183 + for val in beta.iter_mut() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/table_setup.rs:189:11 [INFO] [stdout] | [INFO] [stdout] 189 | rules[rul_ind as usize].push(vec![map[&"Null".to_string()[..]]]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `{ rul_ind }` [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: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup.rs:190:37 [INFO] [stdout] | [INFO] [stdout] 190 | for (_, val) in alpha.iter_mut().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 190 - for (_, val) in alpha.iter_mut().enumerate() { [INFO] [stdout] 190 + for val in alpha.iter_mut() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/table_setup.rs:192:15 [INFO] [stdout] | [INFO] [stdout] 192 | rules[rul_ind as usize].push(val.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `{ rul_ind }` [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: the function `calFIRST` doesn't need a mutable reference [INFO] [stdout] --> src/main.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | &mut map, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 83 - &mut map, [INFO] [stdout] 83 + &map, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/table_setup.rs:284:5 [INFO] [stdout] | [INFO] [stdout] 284 | return First; [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] 284 - return First; [INFO] [stdout] 284 + First [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:198:16 [INFO] [stdout] | [INFO] [stdout] 198 | terminals: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 198 - terminals: &mut Vec, [INFO] [stdout] 198 + terminals: &mut [Symbol], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:121:16 [INFO] [stdout] | [INFO] [stdout] 121 | let text = format!("Parse Tree for the provided snippet:\n\n",); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Parse Tree for the provided snippet:\n\n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap` [INFO] [stdout] --> src/table_setup.rs:210:33 [INFO] [stdout] | [INFO] [stdout] 210 | let mut pairs: Vec<_> = map.into_iter().collect(); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> src/main.rs:127:31 [INFO] [stdout] | [INFO] [stdout] 127 | let padding_str: String = std::iter::repeat(" ").take(padding as usize).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `" ".repeat(padding as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] = note: `#[warn(clippy::manual_str_repeat)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/main.rs:127:31 [INFO] [stdout] | [INFO] [stdout] 127 | let padding_str: String = std::iter::repeat(" ").take(padding as usize).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(" ", padding as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/table_setup.rs:213:24 [INFO] [stdout] | [INFO] [stdout] 213 | pairs.sort_by_key(|&(_, ref index)| **index); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 213 - pairs.sort_by_key(|&(_, ref index)| **index); [INFO] [stdout] 213 + pairs.sort_by_key(|(_, index)| **index); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/table_setup.rs:213:29 [INFO] [stdout] | [INFO] [stdout] 213 | pairs.sort_by_key(|&(_, ref index)| **index); [INFO] [stdout] | ^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 213 - pairs.sort_by_key(|&(_, ref index)| **index); [INFO] [stdout] 213 + pairs.sort_by_key(|&(_, index)| *index); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/table_setup.rs:287:1 [INFO] [stdout] | [INFO] [stdout] 287 | / fn first( [INFO] [stdout] 288 | | index: usize, [INFO] [stdout] 289 | | First: &mut Vec>, [INFO] [stdout] 290 | | progress: &mut Vec, [INFO] [stdout] ... | [INFO] [stdout] 297 | | rm: &HashMap, [INFO] [stdout] 298 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:318:32 [INFO] [stdout] | [INFO] [stdout] 318 | ans.insert(token.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:326:70 [INFO] [stdout] | [INFO] [stdout] 326 | ... writeln!(fi, "Un null {}", non_terminals[token.clone() as usize].name) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:331:29 [INFO] [stdout] | [INFO] [stdout] 331 | ... token.clone() as usize, [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:342:42 [INFO] [stdout] | [INFO] [stdout] 342 | ans.extend(First[token.clone() as usize].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:347:67 [INFO] [stdout] | [INFO] [stdout] 347 | ... writeln!(fi, "Null {}", non_terminals[token.clone() as usize].name) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:352:29 [INFO] [stdout] | [INFO] [stdout] 352 | ... token.clone() as usize, [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/table_setup.rs:363:42 [INFO] [stdout] | [INFO] [stdout] 363 | ans.extend(First[token.clone() as usize].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:383:12 [INFO] [stdout] | [INFO] [stdout] 383 | rules: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 383 - rules: &mut Vec>>, [INFO] [stdout] 383 + rules: &mut [Vec>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/table_setup.rs:392:83 [INFO] [stdout] | [INFO] [stdout] 392 | if terminal_indices.contains(j) && map[&"Null".to_string()] != *j { [INFO] [stdout] | ___________________________________________________________________________________^ [INFO] [stdout] 393 | | n_ulls = false; [INFO] [stdout] 394 | | break; [INFO] [stdout] 395 | | } else if !terminal_indices.contains(j) && !nullables.contains(j) { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/table_setup.rs:395:83 [INFO] [stdout] | [INFO] [stdout] 395 | } else if !terminal_indices.contains(j) && !nullables.contains(j) { [INFO] [stdout] | ___________________________________________________________________________________^ [INFO] [stdout] 396 | | n_ulls = false; [INFO] [stdout] 397 | | break; [INFO] [stdout] 398 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/table_setup.rs:483:5 [INFO] [stdout] | [INFO] [stdout] 483 | return Follow; [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] 483 - return Follow; [INFO] [stdout] 483 + Follow [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:413:16 [INFO] [stdout] | [INFO] [stdout] 413 | terminals: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 413 - terminals: &mut Vec, [INFO] [stdout] 413 + terminals: &mut [Symbol], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:414:20 [INFO] [stdout] | [INFO] [stdout] 414 | non_terminals: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 414 - non_terminals: &mut Vec, [INFO] [stdout] 414 + non_terminals: &mut [Symbol], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `HashMap` [INFO] [stdout] --> src/table_setup.rs:428:33 [INFO] [stdout] | [INFO] [stdout] 428 | let mut pairs: Vec<_> = map.into_iter().collect(); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter_mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/table_setup.rs:430:24 [INFO] [stdout] | [INFO] [stdout] 430 | pairs.sort_by_key(|&(_, ref index)| **index); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 430 - pairs.sort_by_key(|&(_, ref index)| **index); [INFO] [stdout] 430 + pairs.sort_by_key(|(_, index)| **index); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup.rs:502:48 [INFO] [stdout] | [INFO] [stdout] 502 | for (_uu, production) in val.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 502 - for (_uu, production) in val.iter().enumerate() { [INFO] [stdout] 502 + for production in val.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/table_setup.rs:567:1 [INFO] [stdout] | [INFO] [stdout] 567 | / pub fn table_maker( [INFO] [stdout] 568 | | terminals: &mut Vec, [INFO] [stdout] 569 | | rules: &mut Vec>>, [INFO] [stdout] 570 | | First: &mut Vec>, [INFO] [stdout] ... | [INFO] [stdout] 575 | | count: i32, [INFO] [stdout] 576 | | ) -> (Vec>, Vec>) { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:568:16 [INFO] [stdout] | [INFO] [stdout] 568 | terminals: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 568 - terminals: &mut Vec, [INFO] [stdout] 568 + terminals: &mut [Symbol], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:569:12 [INFO] [stdout] | [INFO] [stdout] 569 | rules: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 569 - rules: &mut Vec>>, [INFO] [stdout] 569 + rules: &mut [Vec>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:570:12 [INFO] [stdout] | [INFO] [stdout] 570 | First: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 570 - First: &mut Vec>, [INFO] [stdout] 570 + First: &mut [HashSet], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/table_setup.rs:571:13 [INFO] [stdout] | [INFO] [stdout] 571 | Follow: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 571 - Follow: &mut Vec>, [INFO] [stdout] 571 + Follow: &mut [HashSet], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/table_setup.rs:604:48 [INFO] [stdout] | [INFO] [stdout] 604 | if map[&"Null".to_string()] != *iti as i32 { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `*iti` [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: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/table_setup.rs:621:48 [INFO] [stdout] | [INFO] [stdout] 621 | for (_k, value) in inner_vec.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 621 - for (_k, value) in inner_vec.iter().enumerate() { [INFO] [stdout] 621 + for value in inner_vec.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/table_setup.rs:622:84 [INFO] [stdout] | [INFO] [stdout] 622 | if terminal_indices.contains(value) && map[&"Null".to_string()] != *value as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `*value` [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: the function `calFIRST` doesn't need a mutable reference [INFO] [stdout] --> src/main.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | &mut map, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 83 - &mut map, [INFO] [stdout] 83 + &map, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:121:16 [INFO] [stdout] | [INFO] [stdout] 121 | let text = format!("Parse Tree for the provided snippet:\n\n",); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Parse Tree for the provided snippet:\n\n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> src/main.rs:127:31 [INFO] [stdout] | [INFO] [stdout] 127 | let padding_str: String = std::iter::repeat(" ").take(padding as usize).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `" ".repeat(padding as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] = note: `#[warn(clippy::manual_str_repeat)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/main.rs:127:31 [INFO] [stdout] | [INFO] [stdout] 127 | let padding_str: String = std::iter::repeat(" ").take(padding as usize).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(" ", padding as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.87s [INFO] running `Command { std: "docker" "inspect" "2de6883f268f1e2a2e33c29afdc18798242b2de533ead031fa8aabd6e01e181e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2de6883f268f1e2a2e33c29afdc18798242b2de533ead031fa8aabd6e01e181e", kill_on_drop: false }` [INFO] [stdout] 2de6883f268f1e2a2e33c29afdc18798242b2de533ead031fa8aabd6e01e181e