[INFO] cloning repository https://github.com/alphaom33/TotallyMineInRust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/alphaom33/TotallyMineInRust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Falphaom33%2FTotallyMineInRust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Falphaom33%2FTotallyMineInRust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] efd9df16c4005b592fbcb79908d5c2be06355a93 [INFO] linting alphaom33/TotallyMineInRust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Falphaom33%2FTotallyMineInRust" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-2-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/alphaom33/TotallyMineInRust [INFO] finished tweaking git repo https://github.com/alphaom33/TotallyMineInRust [INFO] tweaked toml for git repo https://github.com/alphaom33/TotallyMineInRust written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/alphaom33/TotallyMineInRust 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/alphaom33/TotallyMineInRust 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-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] f01d3f30288b2ba08a10777c65bd875d601a6bd1050ab07951b099feebf8437e [INFO] running `Command { std: "docker" "start" "-a" "f01d3f30288b2ba08a10777c65bd875d601a6bd1050ab07951b099feebf8437e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f01d3f30288b2ba08a10777c65bd875d601a6bd1050ab07951b099feebf8437e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f01d3f30288b2ba08a10777c65bd875d601a6bd1050ab07951b099feebf8437e", kill_on_drop: false }` [INFO] [stdout] f01d3f30288b2ba08a10777c65bd875d601a6bd1050ab07951b099feebf8437e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 70ba98cb7f49bfd3d7fcca470322bdfcb706dfbfd7f7c734b46e38291e083350 [INFO] running `Command { std: "docker" "start" "-a" "70ba98cb7f49bfd3d7fcca470322bdfcb706dfbfd7f7c734b46e38291e083350", kill_on_drop: false }` [INFO] [stderr] Checking memchr v2.7.2 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking regex-automata v0.4.6 [INFO] [stderr] Checking regex v1.10.4 [INFO] [stderr] Checking my-project v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::str::Chars` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::str::Chars; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::str::Chars` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::str::Chars; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `post_processor::post_process` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use post_processor::post_process; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `post_processor::post_process` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use post_processor::post_process; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::post_processor::post_process` [INFO] [stdout] --> src/tests/lex_test.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::post_processor::post_process; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/tokenizer.rs:64:58 [INFO] [stdout] | [INFO] [stdout] 64 | fn match_basic(c: char, code_iter: &mut Peekable, i: usize, code: &str) -> TokenType { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `code` [INFO] [stdout] --> src/tokenizer.rs:64:68 [INFO] [stdout] | [INFO] [stdout] 64 | fn match_basic(c: char, code_iter: &mut Peekable, i: usize, code: &str) -> TokenType { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_code` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/tokenizer.rs:64:58 [INFO] [stdout] | [INFO] [stdout] 64 | fn match_basic(c: char, code_iter: &mut Peekable, i: usize, code: &str) -> TokenType { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `code` [INFO] [stdout] --> src/tokenizer.rs:64:68 [INFO] [stdout] | [INFO] [stdout] 64 | fn match_basic(c: char, code_iter: &mut Peekable, i: usize, code: &str) -> TokenType { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_code` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/post_processor.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | let a: usize = advance_to(index - 1, tokens, TokenType::LineFeed, -1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `cur_tabs` is never read [INFO] [stdout] --> src/post_processor.rs:172:31 [INFO] [stdout] | [INFO] [stdout] 172 | let mut cur_tabs: usize = 10000; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/post_processor.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | let a: usize = advance_to(index - 1, tokens, TokenType::LineFeed, -1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `cur_tabs` is never read [INFO] [stdout] --> src/post_processor.rs:172:31 [INFO] [stdout] | [INFO] [stdout] 172 | let mut cur_tabs: usize = 10000; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:28:7 [INFO] [stdout] | [INFO] [stdout] 28 | let mut tokens: Vec = lexer::lex(&code); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:28:7 [INFO] [stdout] | [INFO] [stdout] 28 | let mut tokens: Vec = lexer::lex(&code); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `TokenType` is never used [INFO] [stdout] --> src/tokenizer.rs:6:10 [INFO] [stdout] | [INFO] [stdout] 6 | pub enum TokenType { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lex` is never used [INFO] [stdout] --> src/tokenizer.rs:53:8 [INFO] [stdout] | [INFO] [stdout] 53 | pub fn lex(code: &str) -> Vec { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `match_basic` is never used [INFO] [stdout] --> src/tokenizer.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn match_basic(c: char, code_iter: &mut Peekable, i: usize, code: &str) -> TokenType { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `post_process` is never used [INFO] [stdout] --> src/post_processor.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn post_process(tokens: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `change_python` is never used [INFO] [stdout] --> src/post_processor.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn change_python(tokens: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `scan_curlies` is never used [INFO] [stdout] --> src/post_processor.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn scan_curlies(tokens: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 20 | Identifier(String), [INFO] [stdout] | ---------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 20 - Identifier(String), [INFO] [stdout] 20 + Identifier(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | DecimalNum(String), [INFO] [stdout] | ---------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 21 - DecimalNum(String), [INFO] [stdout] 21 + DecimalNum(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:22:10 [INFO] [stdout] | [INFO] [stdout] 22 | Number(String), [INFO] [stdout] | ------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 22 - Number(String), [INFO] [stdout] 22 + Number(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `scan_sets` is never used [INFO] [stdout] --> src/post_processor.rs:53:4 [INFO] [stdout] | [INFO] [stdout] 53 | fn scan_sets(tokens: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:23:10 [INFO] [stdout] | [INFO] [stdout] 23 | String(String), [INFO] [stdout] | ------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 23 - String(String), [INFO] [stdout] 23 + String(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `scan_lambda_curlies` is never used [INFO] [stdout] --> src/post_processor.rs:75:4 [INFO] [stdout] | [INFO] [stdout] 75 | fn scan_lambda_curlies(tokens: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `scan_classify_parens` is never used [INFO] [stdout] --> src/post_processor.rs:86:4 [INFO] [stdout] | [INFO] [stdout] 86 | fn scan_classify_parens(tokens: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_func_add` is never used [INFO] [stdout] --> src/post_processor.rs:95:4 [INFO] [stdout] | [INFO] [stdout] 95 | fn set_func_add(tokens: &Vec, i: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | GroupOpen(String), [INFO] [stdout] | --------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 24 - GroupOpen(String), [INFO] [stdout] 24 + GroupOpen(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:25:14 [INFO] [stdout] | [INFO] [stdout] 25 | GroupClose(String), [INFO] [stdout] | ---------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 25 - GroupClose(String), [INFO] [stdout] 25 + GroupClose(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:26:10 [INFO] [stdout] | [INFO] [stdout] 26 | Symbol(String), [INFO] [stdout] | ------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 26 - Symbol(String), [INFO] [stdout] 26 + Symbol(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | Whitespace(String), [INFO] [stdout] | ---------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 27 - Whitespace(String), [INFO] [stdout] 27 + Whitespace(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Group` is never constructed [INFO] [stdout] --> src/lexer.rs:19:3 [INFO] [stdout] | [INFO] [stdout] 18 | pub enum TokenType { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 19 | Group(Vec), [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `paren_classify` is never used [INFO] [stdout] --> src/post_processor.rs:103:4 [INFO] [stdout] | [INFO] [stdout] 103 | fn paren_classify(tokens: &mut Vec, i: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `curly_add` is never used [INFO] [stdout] --> src/post_processor.rs:141:4 [INFO] [stdout] | [INFO] [stdout] 141 | fn curly_add(tokens: &mut Vec, i: usize) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `token` is never read [INFO] [stdout] --> src/lexer.rs:34:7 [INFO] [stdout] | [INFO] [stdout] 33 | pub struct Token { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 34 | pub token: TokenType, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Token` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `advance_to` is never used [INFO] [stdout] --> src/post_processor.rs:160:4 [INFO] [stdout] | [INFO] [stdout] 160 | fn advance_to(start: usize, array: &Vec, token: TokenType, sign: i32) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Block` is never constructed [INFO] [stdout] --> src/lexer.rs:68:8 [INFO] [stdout] | [INFO] [stdout] 68 | struct Block { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_fun_tabs` is never used [INFO] [stdout] --> src/post_processor.rs:171:4 [INFO] [stdout] | [INFO] [stdout] 171 | fn check_fun_tabs(num_tabs: usize, tokens: &mut Vec, start_dex: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `match_group` is never used [INFO] [stdout] --> src/lexer.rs:99:8 [INFO] [stdout] | [INFO] [stdout] 99 | pub fn match_group(code: &Vec, mut i: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 20 | Identifier(String), [INFO] [stdout] | ---------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 20 - Identifier(String), [INFO] [stdout] 20 + Identifier(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | DecimalNum(String), [INFO] [stdout] | ---------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 21 - DecimalNum(String), [INFO] [stdout] 21 + DecimalNum(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:22:10 [INFO] [stdout] | [INFO] [stdout] 22 | Number(String), [INFO] [stdout] | ------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 22 - Number(String), [INFO] [stdout] 22 + Number(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:23:10 [INFO] [stdout] | [INFO] [stdout] 23 | String(String), [INFO] [stdout] | ------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 23 - String(String), [INFO] [stdout] 23 + String(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | GroupOpen(String), [INFO] [stdout] | --------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 24 - GroupOpen(String), [INFO] [stdout] 24 + GroupOpen(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:25:14 [INFO] [stdout] | [INFO] [stdout] 25 | GroupClose(String), [INFO] [stdout] | ---------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 25 - GroupClose(String), [INFO] [stdout] 25 + GroupClose(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:26:10 [INFO] [stdout] | [INFO] [stdout] 26 | Symbol(String), [INFO] [stdout] | ------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 26 - Symbol(String), [INFO] [stdout] 26 + Symbol(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lexer.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | Whitespace(String), [INFO] [stdout] | ---------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 27 - Whitespace(String), [INFO] [stdout] 27 + Whitespace(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Group` is never constructed [INFO] [stdout] --> src/lexer.rs:19:3 [INFO] [stdout] | [INFO] [stdout] 18 | pub enum TokenType { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 19 | Group(Vec), [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `token` is never read [INFO] [stdout] --> src/lexer.rs:34:7 [INFO] [stdout] | [INFO] [stdout] 33 | pub struct Token { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 34 | pub token: TokenType, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Token` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Block` is never constructed [INFO] [stdout] --> src/lexer.rs:68:8 [INFO] [stdout] | [INFO] [stdout] 68 | struct Block { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `match_group` is never used [INFO] [stdout] --> src/lexer.rs:99:8 [INFO] [stdout] | [INFO] [stdout] 99 | pub fn match_group(code: &Vec, mut i: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tokenizer.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | 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] 61 - return tokens; [INFO] [stdout] 61 + tokens [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tokenizer.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | 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] 61 - return tokens; [INFO] [stdout] 61 + tokens [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/tokenizer.rs:55:42 [INFO] [stdout] | [INFO] [stdout] 55 | let mut code_iter: Peekable = code.chars().into_iter().peekable(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `code.chars()` [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: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/tokenizer.rs:55:42 [INFO] [stdout] | [INFO] [stdout] 55 | let mut code_iter: Peekable = code.chars().into_iter().peekable(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `code.chars()` [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: length comparison to zero [INFO] [stdout] --> src/tokenizer.rs:118:34 [INFO] [stdout] | [INFO] [stdout] 118 | TokenType::String(if accumulator.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!accumulator.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/tokenizer.rs:118:34 [INFO] [stdout] | [INFO] [stdout] 118 | TokenType::String(if accumulator.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!accumulator.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: use of `.to_digit(..).is_some()` [INFO] [stdout] --> src/tokenizer.rs:146:14 [INFO] [stdout] | [INFO] [stdout] 146 | _ if c.to_digit(10).is_some() => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `c.is_digit(10)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_digit_is_some [INFO] [stdout] = note: `#[warn(clippy::to_digit_is_some)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `.to_digit(..).is_some()` [INFO] [stdout] --> src/tokenizer.rs:163:19 [INFO] [stdout] | [INFO] [stdout] 163 | while code_iter.peek().unwrap().to_digit(radix).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `code_iter.peek().unwrap().is_digit(radix)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_digit_is_some [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `.to_digit(..).is_some()` [INFO] [stdout] --> src/tokenizer.rs:146:14 [INFO] [stdout] | [INFO] [stdout] 146 | _ if c.to_digit(10).is_some() => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `c.is_digit(10)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_digit_is_some [INFO] [stdout] = note: `#[warn(clippy::to_digit_is_some)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/post_processor.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | let num_tabs: usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `num_tabs` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 22 ~ [INFO] [stdout] 23 | [INFO] [stdout] 24 ~ let num_tabs: usize = if start != tokens.len() { [INFO] [stdout] 25 | println!("{}, {}", start, tokens[start]); [INFO] [stdout] ... [INFO] [stdout] 29 | } [INFO] [stdout] 30 ~ (j - start) - 1 [INFO] [stdout] 31 | } else { [INFO] [stdout] 32 ~ 0 [INFO] [stdout] 33 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `.to_digit(..).is_some()` [INFO] [stdout] --> src/tokenizer.rs:163:19 [INFO] [stdout] | [INFO] [stdout] 163 | while code_iter.peek().unwrap().to_digit(radix).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `code_iter.peek().unwrap().is_digit(radix)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_digit_is_some [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/post_processor.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | let num_tabs: usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `num_tabs` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 22 ~ [INFO] [stdout] 23 | [INFO] [stdout] 24 ~ let num_tabs: usize = if start != tokens.len() { [INFO] [stdout] 25 | println!("{}, {}", start, tokens[start]); [INFO] [stdout] ... [INFO] [stdout] 29 | } [INFO] [stdout] 30 ~ (j - start) - 1 [INFO] [stdout] 31 | } else { [INFO] [stdout] 32 ~ 0 [INFO] [stdout] 33 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/post_processor.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | / match &tokens[i] { [INFO] [stdout] 57 | | TokenType::Lambda => { [INFO] [stdout] 58 | | let index: usize = set_func_add(tokens, i); [INFO] [stdout] 59 | | if index != tokens.len() { [INFO] [stdout] ... | [INFO] [stdout] 63 | | _ => (), [INFO] [stdout] 64 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 56 ~ if tokens[i] == TokenType::Lambda { [INFO] [stdout] 57 + let index: usize = set_func_add(tokens, i); [INFO] [stdout] 58 + if index != tokens.len() { [INFO] [stdout] 59 + to_add.push(index); [INFO] [stdout] 60 + } [INFO] [stdout] 61 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/post_processor.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | / match &tokens[i] { [INFO] [stdout] 89 | | TokenType::LeftParenthesis => paren_classify(tokens, i), [INFO] [stdout] 90 | | _ => (), [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ help: try: `if tokens[i] == TokenType::LeftParenthesis { paren_classify(tokens, i) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/post_processor.rs:97:5 [INFO] [stdout] | [INFO] [stdout] 97 | / return match tokens[j - 1] { [INFO] [stdout] 98 | | TokenType::Name(_) => j, [INFO] [stdout] 99 | | _ => usize::MAX, [INFO] [stdout] 100 | | }; [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] 97 ~ match tokens[j - 1] { [INFO] [stdout] 98 + TokenType::Name(_) => j, [INFO] [stdout] 99 + _ => usize::MAX, [INFO] [stdout] 100 ~ } [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/post_processor.rs:103:27 [INFO] [stdout] | [INFO] [stdout] 103 | fn paren_classify(tokens: &mut Vec, i: usize) { [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] 103 - fn paren_classify(tokens: &mut Vec, i: usize) { [INFO] [stdout] 103 + fn paren_classify(tokens: &mut [TokenType], i: usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/post_processor.rs:115:5 [INFO] [stdout] | [INFO] [stdout] 115 | / match tokens[i - 1] { [INFO] [stdout] 116 | | TokenType::Name(_) => { [INFO] [stdout] 117 | | tokens[i] = TokenType::LeftCallParenthesis; [INFO] [stdout] 118 | | tokens[j] = TokenType::RightCallParenthesis; [INFO] [stdout] ... | [INFO] [stdout] 121 | | _ => (), [INFO] [stdout] 122 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 115 ~ if let TokenType::Name(_) = tokens[i - 1] { [INFO] [stdout] 116 + tokens[i] = TokenType::LeftCallParenthesis; [INFO] [stdout] 117 + tokens[j] = TokenType::RightCallParenthesis; [INFO] [stdout] 118 + return; [INFO] [stdout] 119 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/post_processor.rs:124:5 [INFO] [stdout] | [INFO] [stdout] 124 | let to_add: (TokenType, TokenType); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `to_add` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 124 ~ [INFO] [stdout] 125 ~ let to_add: (TokenType, TokenType) = if tokens[j + 1] == TokenType::Lambda { [INFO] [stdout] 126 ~ ( [INFO] [stdout] 127 | TokenType::LeftFuncParenthesis, [INFO] [stdout] 128 | TokenType::RightFuncParenthesis, [INFO] [stdout] 129 ~ ) [INFO] [stdout] 130 | } else { [INFO] [stdout] 131 ~ ( [INFO] [stdout] 132 | TokenType::LeftCaptureParenthesis, [INFO] [stdout] 133 | TokenType::RightCaptureParenthesis, [INFO] [stdout] 134 ~ ) [INFO] [stdout] 135 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/post_processor.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | return i; [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] 168 - return i; [INFO] [stdout] 168 + i [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/post_processor.rs:160:36 [INFO] [stdout] | [INFO] [stdout] 160 | fn advance_to(start: usize, array: &Vec, token: TokenType, sign: i32) -> usize { [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] 160 - fn advance_to(start: usize, array: &Vec, token: TokenType, sign: i32) -> usize { [INFO] [stdout] 160 + fn advance_to(start: usize, array: &[TokenType], token: TokenType, sign: i32) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/post_processor.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | / match &tokens[i] { [INFO] [stdout] 57 | | TokenType::Lambda => { [INFO] [stdout] 58 | | let index: usize = set_func_add(tokens, i); [INFO] [stdout] 59 | | if index != tokens.len() { [INFO] [stdout] ... | [INFO] [stdout] 63 | | _ => (), [INFO] [stdout] 64 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 56 ~ if tokens[i] == TokenType::Lambda { [INFO] [stdout] 57 + let index: usize = set_func_add(tokens, i); [INFO] [stdout] 58 + if index != tokens.len() { [INFO] [stdout] 59 + to_add.push(index); [INFO] [stdout] 60 + } [INFO] [stdout] 61 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/post_processor.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | / match &tokens[i] { [INFO] [stdout] 89 | | TokenType::LeftParenthesis => paren_classify(tokens, i), [INFO] [stdout] 90 | | _ => (), [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________^ help: try: `if tokens[i] == TokenType::LeftParenthesis { paren_classify(tokens, i) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/post_processor.rs:97:5 [INFO] [stdout] | [INFO] [stdout] 97 | / return match tokens[j - 1] { [INFO] [stdout] 98 | | TokenType::Name(_) => j, [INFO] [stdout] 99 | | _ => usize::MAX, [INFO] [stdout] 100 | | }; [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] 97 ~ match tokens[j - 1] { [INFO] [stdout] 98 + TokenType::Name(_) => j, [INFO] [stdout] 99 + _ => usize::MAX, [INFO] [stdout] 100 ~ } [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/post_processor.rs:103:27 [INFO] [stdout] | [INFO] [stdout] 103 | fn paren_classify(tokens: &mut Vec, i: usize) { [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] 103 - fn paren_classify(tokens: &mut Vec, i: usize) { [INFO] [stdout] 103 + fn paren_classify(tokens: &mut [TokenType], i: usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/post_processor.rs:115:5 [INFO] [stdout] | [INFO] [stdout] 115 | / match tokens[i - 1] { [INFO] [stdout] 116 | | TokenType::Name(_) => { [INFO] [stdout] 117 | | tokens[i] = TokenType::LeftCallParenthesis; [INFO] [stdout] 118 | | tokens[j] = TokenType::RightCallParenthesis; [INFO] [stdout] ... | [INFO] [stdout] 121 | | _ => (), [INFO] [stdout] 122 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 115 ~ if let TokenType::Name(_) = tokens[i - 1] { [INFO] [stdout] 116 + tokens[i] = TokenType::LeftCallParenthesis; [INFO] [stdout] 117 + tokens[j] = TokenType::RightCallParenthesis; [INFO] [stdout] 118 + return; [INFO] [stdout] 119 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/post_processor.rs:124:5 [INFO] [stdout] | [INFO] [stdout] 124 | let to_add: (TokenType, TokenType); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `to_add` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 124 ~ [INFO] [stdout] 125 ~ let to_add: (TokenType, TokenType) = if tokens[j + 1] == TokenType::Lambda { [INFO] [stdout] 126 ~ ( [INFO] [stdout] 127 | TokenType::LeftFuncParenthesis, [INFO] [stdout] 128 | TokenType::RightFuncParenthesis, [INFO] [stdout] 129 ~ ) [INFO] [stdout] 130 | } else { [INFO] [stdout] 131 ~ ( [INFO] [stdout] 132 | TokenType::LeftCaptureParenthesis, [INFO] [stdout] 133 | TokenType::RightCaptureParenthesis, [INFO] [stdout] 134 ~ ) [INFO] [stdout] 135 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/post_processor.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | return i; [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] 168 - return i; [INFO] [stdout] 168 + i [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/post_processor.rs:160:36 [INFO] [stdout] | [INFO] [stdout] 160 | fn advance_to(start: usize, array: &Vec, token: TokenType, sign: i32) -> usize { [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] 160 - fn advance_to(start: usize, array: &Vec, token: TokenType, sign: i32) -> usize { [INFO] [stdout] 160 + fn advance_to(start: usize, array: &[TokenType], token: TokenType, sign: i32) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:14:3 [INFO] [stdout] | [INFO] [stdout] 14 | return Regex::is_match(&Regex::new(regex).unwrap(), &token); [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] 14 - return Regex::is_match(&Regex::new(regex).unwrap(), &token); [INFO] [stdout] 14 + Regex::is_match(&Regex::new(regex).unwrap(), &token) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:14:3 [INFO] [stdout] | [INFO] [stdout] 14 | return Regex::is_match(&Regex::new(regex).unwrap(), &token); [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] 14 - return Regex::is_match(&Regex::new(regex).unwrap(), &token); [INFO] [stdout] 14 + Regex::is_match(&Regex::new(regex).unwrap(), &token) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:14:55 [INFO] [stdout] | [INFO] [stdout] 14 | return Regex::is_match(&Regex::new(regex).unwrap(), &token); [INFO] [stdout] | ^^^^^^ help: change this to: `token` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:14:55 [INFO] [stdout] | [INFO] [stdout] 14 | return Regex::is_match(&Regex::new(regex).unwrap(), &token); [INFO] [stdout] | ^^^^^^ help: change this to: `token` [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: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:62:3 [INFO] [stdout] | [INFO] [stdout] 62 | / return Token { [INFO] [stdout] 63 | | token: token_type, [INFO] [stdout] 64 | | length: token.len() [INFO] [stdout] 65 | | }; [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] 62 ~ Token { [INFO] [stdout] 63 + token: token_type, [INFO] [stdout] 64 + length: token.len() [INFO] [stdout] 65 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:62:3 [INFO] [stdout] | [INFO] [stdout] 62 | / return Token { [INFO] [stdout] 63 | | token: token_type, [INFO] [stdout] 64 | | length: token.len() [INFO] [stdout] 65 | | }; [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] 62 ~ Token { [INFO] [stdout] 63 + token: token_type, [INFO] [stdout] 64 + length: token.len() [INFO] [stdout] 65 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lexer.rs:44:28 [INFO] [stdout] | [INFO] [stdout] 44 | } else if "([{".contains(&token) { [INFO] [stdout] | ^^^^^^ help: change this to: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lexer.rs:46:28 [INFO] [stdout] | [INFO] [stdout] 46 | } else if ")]}".contains(&token) { [INFO] [stdout] | ^^^^^^ help: change this to: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lexer.rs:44:28 [INFO] [stdout] | [INFO] [stdout] 44 | } else if "([{".contains(&token) { [INFO] [stdout] | ^^^^^^ help: change this to: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:50:41 [INFO] [stdout] | [INFO] [stdout] 50 | } else if matches_regex(STRING_REGEX, &token) { [INFO] [stdout] | ^^^^^^ help: change this to: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:52:38 [INFO] [stdout] | [INFO] [stdout] 52 | } else if matches_regex(DEC_REGEX, &token) { [INFO] [stdout] | ^^^^^^ help: change this to: `token` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/lexer.rs:46:28 [INFO] [stdout] | [INFO] [stdout] 46 | } else if ")]}".contains(&token) { [INFO] [stdout] | ^^^^^^ help: change this to: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:54:38 [INFO] [stdout] | [INFO] [stdout] 54 | } else if matches_regex(NUM_REGEX, &token) { [INFO] [stdout] | ^^^^^^ help: change this to: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:50:41 [INFO] [stdout] | [INFO] [stdout] 50 | } else if matches_regex(STRING_REGEX, &token) { [INFO] [stdout] | ^^^^^^ help: change this to: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:56:41 [INFO] [stdout] | [INFO] [stdout] 56 | } else if matches_regex(SYMBOL_REGEX, &token) { [INFO] [stdout] | ^^^^^^ help: change this to: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lexer.rs:80:6 [INFO] [stdout] | [INFO] [stdout] 80 | if !token.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `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: called `unwrap` on `token` after checking its variant with `is_none` [INFO] [stdout] --> src/lexer.rs:81:20 [INFO] [stdout] | [INFO] [stdout] 80 | if !token.is_none() { [INFO] [stdout] | --------------- the check is happening here [INFO] [stdout] 81 | let t: Match = token.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:52:38 [INFO] [stdout] | [INFO] [stdout] 52 | } else if matches_regex(DEC_REGEX, &token) { [INFO] [stdout] | ^^^^^^ help: change this to: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:54:38 [INFO] [stdout] | [INFO] [stdout] 54 | } else if matches_regex(NUM_REGEX, &token) { [INFO] [stdout] | ^^^^^^ help: change this to: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer.rs:56:41 [INFO] [stdout] | [INFO] [stdout] 56 | } else if matches_regex(SYMBOL_REGEX, &token) { [INFO] [stdout] | ^^^^^^ help: change this to: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lexer.rs:80:6 [INFO] [stdout] | [INFO] [stdout] 80 | if !token.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `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: called `unwrap` on `token` after checking its variant with `is_none` [INFO] [stdout] --> src/lexer.rs:81:20 [INFO] [stdout] | [INFO] [stdout] 80 | if !token.is_none() { [INFO] [stdout] | --------------- the check is happening here [INFO] [stdout] 81 | let t: Match = token.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:95:3 [INFO] [stdout] | [INFO] [stdout] 95 | return output; [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] 95 - return output; [INFO] [stdout] 95 + output [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/lexer.rs:99:26 [INFO] [stdout] | [INFO] [stdout] 99 | pub fn match_group(code: &Vec, mut i: usize) -> usize { [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] 99 - pub fn match_group(code: &Vec, mut i: usize) -> usize { [INFO] [stdout] 99 + pub fn match_group(code: &[Token], mut i: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/main.rs:21:6 [INFO] [stdout] | [INFO] [stdout] 21 | if code.chars().last().unwrap() != '\n' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!code.ends_with('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_last_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:95:3 [INFO] [stdout] | [INFO] [stdout] 95 | return output; [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] 95 - return output; [INFO] [stdout] 95 + output [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:91:3 [INFO] [stdout] | [INFO] [stdout] 91 | return a; [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] 91 - return a; [INFO] [stdout] 91 + a [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/lexer.rs:99:26 [INFO] [stdout] | [INFO] [stdout] 99 | pub fn match_group(code: &Vec, mut i: usize) -> usize { [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] 99 - pub fn match_group(code: &Vec, mut i: usize) -> usize { [INFO] [stdout] 99 + pub fn match_group(code: &[Token], mut i: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/main.rs:21:6 [INFO] [stdout] | [INFO] [stdout] 21 | if code.chars().last().unwrap() != '\n' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!code.ends_with('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_last_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | / if *code_iter.peek().unwrap() == &' ' { [INFO] [stdout] 44 | | while code_iter.next().unwrap() == &' ' { [INFO] [stdout] 45 | | num_spaces += 1; [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 42 ~ '\n' [INFO] [stdout] 43 ~ if *code_iter.peek().unwrap() == &' ' => { [INFO] [stdout] 44 | while code_iter.next().unwrap() == &' ' { [INFO] [stdout] ... [INFO] [stdout] 47 | break; [INFO] [stdout] 48 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / match c { [INFO] [stdout] 42 | | '\n' => { [INFO] [stdout] 43 | | if *code_iter.peek().unwrap() == &' ' { [INFO] [stdout] 44 | | while code_iter.next().unwrap() == &' ' { [INFO] [stdout] ... | [INFO] [stdout] 50 | | _ => (), [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ if c == &'\n' { [INFO] [stdout] 42 + if *code_iter.peek().unwrap() == &' ' { [INFO] [stdout] 43 + while code_iter.next().unwrap() == &' ' { [INFO] [stdout] 44 + num_spaces += 1; [INFO] [stdout] 45 + } [INFO] [stdout] 46 + break; [INFO] [stdout] 47 + } [INFO] [stdout] 48 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:91:3 [INFO] [stdout] | [INFO] [stdout] 91 | return a; [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] 91 - return a; [INFO] [stdout] 91 + a [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | / if *code_iter.peek().unwrap() == &' ' { [INFO] [stdout] 44 | | while code_iter.next().unwrap() == &' ' { [INFO] [stdout] 45 | | num_spaces += 1; [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 42 ~ '\n' [INFO] [stdout] 43 ~ if *code_iter.peek().unwrap() == &' ' => { [INFO] [stdout] 44 | while code_iter.next().unwrap() == &' ' { [INFO] [stdout] ... [INFO] [stdout] 47 | break; [INFO] [stdout] 48 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / match c { [INFO] [stdout] 42 | | '\n' => { [INFO] [stdout] 43 | | if *code_iter.peek().unwrap() == &' ' { [INFO] [stdout] 44 | | while code_iter.next().unwrap() == &' ' { [INFO] [stdout] ... | [INFO] [stdout] 50 | | _ => (), [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ if c == &'\n' { [INFO] [stdout] 42 + if *code_iter.peek().unwrap() == &' ' { [INFO] [stdout] 43 + while code_iter.next().unwrap() == &' ' { [INFO] [stdout] 44 + num_spaces += 1; [INFO] [stdout] 45 + } [INFO] [stdout] 46 + break; [INFO] [stdout] 47 + } [INFO] [stdout] 48 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:98:3 [INFO] [stdout] | [INFO] [stdout] 98 | return contents; [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] 98 - return contents; [INFO] [stdout] 98 + contents [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:98:3 [INFO] [stdout] | [INFO] [stdout] 98 | return contents; [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] 98 - return contents; [INFO] [stdout] 98 + contents [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.83s [INFO] running `Command { std: "docker" "inspect" "70ba98cb7f49bfd3d7fcca470322bdfcb706dfbfd7f7c734b46e38291e083350", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "70ba98cb7f49bfd3d7fcca470322bdfcb706dfbfd7f7c734b46e38291e083350", kill_on_drop: false }` [INFO] [stdout] 70ba98cb7f49bfd3d7fcca470322bdfcb706dfbfd7f7c734b46e38291e083350