[INFO] cloning repository https://github.com/Shade3652/Tide [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Shade3652/Tide" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FShade3652%2FTide", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FShade3652%2FTide'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0be6bcc8d168af5bcf2fb4bb23f8b1b79d204f53 [INFO] linting Shade3652/Tide against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FShade3652%2FTide" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Shade3652/Tide [INFO] finished tweaking git repo https://github.com/Shade3652/Tide [INFO] tweaked toml for git repo https://github.com/Shade3652/Tide written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Shade3652/Tide 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/Shade3652/Tide already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded proc-macro2 v1.0.88 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 4814b8eb9516b382daddc5cf6b1f4583ebee2c13951a36eaa7face09cd4e945e [INFO] running `Command { std: "docker" "start" "-a" "4814b8eb9516b382daddc5cf6b1f4583ebee2c13951a36eaa7face09cd4e945e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4814b8eb9516b382daddc5cf6b1f4583ebee2c13951a36eaa7face09cd4e945e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4814b8eb9516b382daddc5cf6b1f4583ebee2c13951a36eaa7face09cd4e945e", kill_on_drop: false }` [INFO] [stdout] 4814b8eb9516b382daddc5cf6b1f4583ebee2c13951a36eaa7face09cd4e945e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 4ef3cdfcc9baf2e26eaca4e2b4c724fba4bf21684ada6a201ef7767f09afe9d2 [INFO] running `Command { std: "docker" "start" "-a" "4ef3cdfcc9baf2e26eaca4e2b4c724fba4bf21684ada6a201ef7767f09afe9d2", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.88 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Checking colored v2.1.0 [INFO] [stderr] Checking convert_case v0.8.0 [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Compiling syn v2.0.79 [INFO] [stderr] Compiling serde_derive v1.0.210 [INFO] [stderr] Checking serde v1.0.210 [INFO] [stderr] Checking serde_json v1.0.128 [INFO] [stderr] Checking vRust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `Case` and `Casing` [INFO] [stdout] --> src/main.rs:6:20 [INFO] [stdout] | [INFO] [stdout] 6 | use convert_case::{Case, Casing}; [INFO] [stdout] | ^^^^ ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `else` branch is empty [INFO] [stdout] --> src/lang/keywords.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | / else { [INFO] [stdout] 42 | | [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_else [INFO] [stdout] = note: `#[warn(clippy::needless_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Case` and `Casing` [INFO] [stdout] --> src/main.rs:6:20 [INFO] [stdout] | [INFO] [stdout] 6 | use convert_case::{Case, Casing}; [INFO] [stdout] | ^^^^ ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `else` branch is empty [INFO] [stdout] --> src/lang/keywords.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | / else { [INFO] [stdout] 42 | | [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_else [INFO] [stdout] = note: `#[warn(clippy::needless_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `string` is never read [INFO] [stdout] --> src/parser.rs:510:9 [INFO] [stdout] | [INFO] [stdout] 510 | string = String::from(""); [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:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let mut asts: Vec = parsed.1; //Groups of anything in parentheses, brackets, or braces [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: unused variable: `scopes` [INFO] [stdout] --> src/main.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let scopes: Vec> = parsed.4; //Lines in braces [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_scopes` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scope_line_asts` [INFO] [stdout] --> src/main.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let scope_line_asts: Vec> = parsed.5; //Line ASTS but for the scopes [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_scope_line_asts` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `newlines` [INFO] [stdout] --> src/main.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let newlines: Vec = parsed.6; //Indexes of newlines [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_newlines` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `variables` is never read [INFO] [stdout] --> src/main.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | variables = execute(asts, line_asts[1].clone(), lines[1].clone(), variables, 0); //TO-DO: Replace 0 With the Line # [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `var_type` and `var_depth` are never read [INFO] [stdout] --> src/main.rs:358:5 [INFO] [stdout] | [INFO] [stdout] 357 | struct VAR { [INFO] [stdout] | --- fields in this struct [INFO] [stdout] 358 | var_type: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 361 | var_depth: i64, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ERROR` is never constructed [INFO] [stdout] --> src/main.rs:364:8 [INFO] [stdout] | [INFO] [stdout] 364 | struct ERROR { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `keyword_execute` is never used [INFO] [stdout] --> src/lang/keywords.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn keyword_execute() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser.rs:4:32 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn parse(text: &String) -> (Vec>, Vec, Vec, Vec>, Vec>, Vec>, Vec) { [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: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:81:16 [INFO] [stdout] | [INFO] [stdout] 81 | if !(num == "") { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `(num != "")` [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/parser.rs:105:16 [INFO] [stdout] | [INFO] [stdout] 105 | if !(string == "") && !dquote && !squote { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(string != "")` [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/parser.rs:205:115 [INFO] [stdout] | [INFO] [stdout] 205 | ...s(&temp_token.value)) && !(possible_keyword == "KEYWORD"){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(possible_keyword != "KEYWORD")` [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/parser.rs:487:8 [INFO] [stdout] | [INFO] [stdout] 487 | if !(num == "") { //Last checks in case the last character was a number (It't wont add otherwise because it would need anothe... [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `(num != "")` [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/parser.rs:496:8 [INFO] [stdout] | [INFO] [stdout] 496 | if !(string == "") { //Same but with letters [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(string != "")` [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/parser.rs:666:5 [INFO] [stdout] | [INFO] [stdout] 666 | return (lines, asts, errors, line_asts, scopes, scope_asts, newlines); [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] 666 - return (lines, asts, errors, line_asts, scopes, scope_asts, newlines); [INFO] [stdout] 666 + (lines, asts, errors, line_asts, scopes, scope_asts, newlines) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/parser.rs:4:20 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn parse(text: &String) -> (Vec>, Vec, Vec, Vec>, Vec>, Vec>, 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] 4 - pub fn parse(text: &String) -> (Vec>, Vec, Vec, Vec>, Vec>, Vec>, Vec) { [INFO] [stdout] 4 + pub fn parse(text: &str) -> (Vec>, Vec, Vec, Vec>, Vec>, Vec>, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:43:27 [INFO] [stdout] | [INFO] [stdout] 43 | newlines.push(char_num.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:47:44 [INFO] [stdout] | [INFO] [stdout] 47 | ....contains(char) && string.len() == 0) || char == '.'{ //Checks to see if the number being parsed has 2 decimal points [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `string.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: comparison to empty slice [INFO] [stdout] --> src/parser.rs:59:24 [INFO] [stdout] | [INFO] [stdout] 59 | if num == "" { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `num.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:60:106 [INFO] [stdout] | [INFO] [stdout] 60 | tokens.push(Token {token_type: "DOT".to_string(), value: ".".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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: manual implementation of an assign operation [INFO] [stdout] --> src/parser.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | string = string + (num.clone()).as_str(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `string += (num.clone()).as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/parser.rs:81:18 [INFO] [stdout] | [INFO] [stdout] 81 | if !(num == "") { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `num.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:100:118 [INFO] [stdout] | [INFO] [stdout] 100 | ...contains(char) && string.len() != 0)) && !dquote && !squote { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!string.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/parser.rs:105:18 [INFO] [stdout] | [INFO] [stdout] 105 | if !(string == "") && !dquote && !squote { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `string.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:128:95 [INFO] [stdout] | [INFO] [stdout] 128 | tokens.push(Token {token_type: "PLUS".to_string(), value: "+".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:132:96 [INFO] [stdout] | [INFO] [stdout] 132 | tokens.push(Token {token_type: "MINUS".to_string(), value: "-".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:136:94 [INFO] [stdout] | [INFO] [stdout] 136 | tokens.push(Token {token_type: "MUL".to_string(), value: "*".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:140:94 [INFO] [stdout] | [INFO] [stdout] 140 | tokens.push(Token {token_type: "MOD".to_string(), value: "%".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:146:101 [INFO] [stdout] | [INFO] [stdout] 146 | tokens.push(Token {token_type: "DODIV".to_string(), value: "//".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:149:98 [INFO] [stdout] | [INFO] [stdout] 149 | tokens.push(Token {token_type: "DIV".to_string(), value: "/".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:154:95 [INFO] [stdout] | [INFO] [stdout] 154 | tokens.push(Token {token_type: "TTPO".to_string(), value: "^".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:158:98 [INFO] [stdout] | [INFO] [stdout] 158 | tokens.push(Token {token_type: "BSLASH".to_string(), value: "\\".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:162:95 [INFO] [stdout] | [INFO] [stdout] 162 | tokens.push(Token {token_type: "LPAR".to_string(), value: "(".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:169:95 [INFO] [stdout] | [INFO] [stdout] 169 | tokens.push(Token {token_type: "RPAR".to_string(), value: ")".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:172:16 [INFO] [stdout] | [INFO] [stdout] 172 | if lpars.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lpars.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/parser.rs:178:72 [INFO] [stdout] | [INFO] [stdout] 178 | paren_sets.push(ParPairs{l: lpars[lpars.len() - 1].par, r: (tokens.len() - 1).try_into().unwrap()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [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/parser.rs:212:24 [INFO] [stdout] | [INFO] [stdout] 212 | if asts[asts.len() - 1].children.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!asts[asts.len() - 1].children.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:232:96 [INFO] [stdout] | [INFO] [stdout] 232 | tokens.push(Token {token_type: "COLON".to_string(), value: ":".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:236:100 [INFO] [stdout] | [INFO] [stdout] 236 | tokens.push(Token {token_type: "SEMICOLON".to_string(), value: ";".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:242:99 [INFO] [stdout] | [INFO] [stdout] 242 | tokens.push(Token {token_type: "AND".to_string(), value: "&&".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:245:103 [INFO] [stdout] | [INFO] [stdout] 245 | tokens.push(Token {token_type: "APERSAND".to_string(), value: "&".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:252:98 [INFO] [stdout] | [INFO] [stdout] 252 | tokens.push(Token {token_type: "OR".to_string(), value: "||".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:255:99 [INFO] [stdout] | [INFO] [stdout] 255 | tokens.push(Token {token_type: "LINE".to_string(), value: "|".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:260:94 [INFO] [stdout] | [INFO] [stdout] 260 | tokens.push(Token {token_type: "NOT".to_string(), value: "!".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:264:98 [INFO] [stdout] | [INFO] [stdout] 264 | tokens.push(Token {token_type: "GREATER".to_string(), value: ">".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:268:95 [INFO] [stdout] | [INFO] [stdout] 268 | tokens.push(Token {token_type: "LESS".to_string(), value: "<".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:272:96 [INFO] [stdout] | [INFO] [stdout] 272 | tokens.push(Token {token_type: "COMMA".to_string(), value: ",".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:278:102 [INFO] [stdout] | [INFO] [stdout] 278 | tokens.push(Token {token_type: "DEQUAL".to_string(), value: "==".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:282:102 [INFO] [stdout] | [INFO] [stdout] 282 | tokens.push(Token {token_type: "NEQUAL".to_string(), value: "!=".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:285:100 [INFO] [stdout] | [INFO] [stdout] 285 | tokens.push(Token {token_type: "EQUAL".to_string(), value: "=".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:290:97 [INFO] [stdout] | [INFO] [stdout] 290 | tokens.push(Token {token_type: "LBRACE".to_string(), value: "{".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:296:97 [INFO] [stdout] | [INFO] [stdout] 296 | tokens.push(Token {token_type: "RBRACE".to_string(), value: "}".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:299:16 [INFO] [stdout] | [INFO] [stdout] 299 | if lbraces.len() == 0 { //Checks to see if there are any left braces to match the right brace [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lbraces.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/parser.rs:304:76 [INFO] [stdout] | [INFO] [stdout] 304 | brace_sets.push(ParPairs{l: lbraces[lbraces.len() - 1].par, r: (tokens.len() - 1).try_into().unwrap()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:315:16 [INFO] [stdout] | [INFO] [stdout] 315 | if temp.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `temp.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:318:103 [INFO] [stdout] | [INFO] [stdout] 318 | tokens.push(Token {token_type: "EBRACES".to_string(), value: "{}".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:325:113 [INFO] [stdout] | [INFO] [stdout] 325 | ....len() - 1).to_string(), start: char_num.clone() - temp_len as i64}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:332:99 [INFO] [stdout] | [INFO] [stdout] 332 | tokens.push(Token {token_type: "LBRACKET".to_string(), value: "[".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:338:99 [INFO] [stdout] | [INFO] [stdout] 338 | tokens.push(Token {token_type: "RBRACKET".to_string(), value: "]".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:340:16 [INFO] [stdout] | [INFO] [stdout] 340 | if lbrackets.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lbrackets.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/parser.rs:345:82 [INFO] [stdout] | [INFO] [stdout] 345 | bracket_sets.push(ParPairs{l: lbrackets[lbrackets.len() - 1].par, r: (tokens.len() - 1).try_into().unwrap()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:355:17 [INFO] [stdout] | [INFO] [stdout] 355 | if temp.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `temp.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:358:109 [INFO] [stdout] | [INFO] [stdout] 358 | tokens.push(Token {token_type: "EBRACKETS".to_string(), value: "[]".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:366:112 [INFO] [stdout] | [INFO] [stdout] 366 | ....len() - 1).to_string(), start: char_num.clone() - temp_len as i64}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:376:99 [INFO] [stdout] | [INFO] [stdout] 376 | tokens.push(Token {token_type: "CHAR".to_string(), value: '"'.to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:380:101 [INFO] [stdout] | [INFO] [stdout] 380 | tokens.push(Token {token_type: "DQUOTE".to_string(), value: '"'.to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:395:127 [INFO] [stdout] | [INFO] [stdout] 395 | ...ng_len - 1].to_string(), start: char_num.clone() - string_len as i64}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:412:100 [INFO] [stdout] | [INFO] [stdout] 412 | tokens.push(Token {token_type: "CHAR".to_string(), value: '\''.to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:416:102 [INFO] [stdout] | [INFO] [stdout] 416 | tokens.push(Token {token_type: "SQUOTE".to_string(), value: '\''.to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:428:138 [INFO] [stdout] | [INFO] [stdout] 428 | ...1).unwrap().to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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` statement can be collapsed [INFO] [stdout] --> src/parser.rs:442:9 [INFO] [stdout] | [INFO] [stdout] 442 | / if esc_char_last { [INFO] [stdout] 443 | | [INFO] [stdout] 444 | | if char == 'n' { [INFO] [stdout] 445 | | string = string[0..string.len() - 1].to_string(); [INFO] [stdout] ... | [INFO] [stdout] 452 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 442 ~ if esc_char_last [INFO] [stdout] 443 | [INFO] [stdout] 444 ~ && char == 'n' { [INFO] [stdout] 445 | string = string[0..string.len() - 1].to_string(); [INFO] [stdout] ... [INFO] [stdout] 450 | [INFO] [stdout] 451 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/parser.rs:447:17 [INFO] [stdout] | [INFO] [stdout] 447 | string = string + "\n"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `string += "\n"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/parser.rs:462:13 [INFO] [stdout] | [INFO] [stdout] 462 | / if char == '\\' { [INFO] [stdout] 463 | | esc_char_last = true; [INFO] [stdout] ... | [INFO] [stdout] 467 | | esc_char_last = false; [INFO] [stdout] 468 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `esc_char_last = char == '\\';` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/parser.rs:487:10 [INFO] [stdout] | [INFO] [stdout] 487 | if !(num == "") { //Last checks in case the last character was a number (It't wont add otherwise because it would need anothe... [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `num.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/parser.rs:496:10 [INFO] [stdout] | [INFO] [stdout] 496 | if !(string == "") { //Same but with letters [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `string.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `string` is never read [INFO] [stdout] --> src/parser.rs:510:9 [INFO] [stdout] | [INFO] [stdout] 510 | string = String::from(""); [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: casting integer literal to `i64` is unnecessary [INFO] [stdout] --> src/parser.rs:504:109 [INFO] [stdout] | [INFO] [stdout] 504 | tokens.push(Token {token_type: "CHAR".to_string(), value: string.clone(), start: char_num - 1 as i64}); [INFO] [stdout] | ^^^^^^^^ help: try: `1_i64` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:573:8 [INFO] [stdout] | [INFO] [stdout] 573 | if lpars.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lpars.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/parser.rs:574:41 [INFO] [stdout] | [INFO] [stdout] 574 | errors.push(PErr{error:4, char: lpars[0].char as i64}); //ERROR [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `lpars[0].char` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:577:8 [INFO] [stdout] | [INFO] [stdout] 577 | if lbraces.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lbraces.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/parser.rs:578:41 [INFO] [stdout] | [INFO] [stdout] 578 | errors.push(PErr{error:5, char: lbraces[0].char as i64}); //ERROR [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `lbraces[0].char` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:581:8 [INFO] [stdout] | [INFO] [stdout] 581 | if lbrackets.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lbrackets.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/parser.rs:582:41 [INFO] [stdout] | [INFO] [stdout] 582 | errors.push(PErr{error:6, char: lbrackets[0].char as i64}); //ERROR [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lbrackets[0].char` [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 creates an owned instance just for comparison [INFO] [stdout] --> src/parser.rs:610:32 [INFO] [stdout] | [INFO] [stdout] 610 | if i.token_type == String::from("AST") || i.token_type == String::from("ARGS") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `"AST"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/parser.rs:610:71 [INFO] [stdout] | [INFO] [stdout] 610 | if i.token_type == String::from("AST") || i.token_type == String::from("ARGS") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"ARGS"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/parser.rs:649:40 [INFO] [stdout] | [INFO] [stdout] 649 | if k.token_type == String::from("AST") || k.token_type == String::from("ARGS") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `"AST"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/parser.rs:649:79 [INFO] [stdout] | [INFO] [stdout] 649 | if k.token_type == String::from("AST") || k.token_type == String::from("ARGS") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"ARGS"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `AST` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:678:12 [INFO] [stdout] | [INFO] [stdout] 678 | pub struct AST { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Ast` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lang/keywords.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | return variables; [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] 46 - return variables; [INFO] [stdout] 46 + variables [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/lang/keywords.rs:9:49 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &Vec, depth: &i64) -> 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] 9 - pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &Vec, depth: &i64) -> Vec { [INFO] [stdout] 9 + pub fn var_check(mut variables: Vec, line: &[Token], asts: &Vec, line_asts: &Vec, depth: &i64) -> 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/lang/keywords.rs:9:68 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &Vec, depth: &i64) -> 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] 9 - pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &Vec, depth: &i64) -> Vec { [INFO] [stdout] 9 + pub fn var_check(mut variables: Vec, line: &Vec, asts: &[AST], line_asts: &Vec, depth: &i64) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let mut asts: Vec = parsed.1; //Groups of anything in parentheses, brackets, or braces [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lang/keywords.rs:9:90 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &Vec, depth: &i64) -> 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] 9 - pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &Vec, depth: &i64) -> Vec { [INFO] [stdout] 9 + pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &[i64], depth: &i64) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scopes` [INFO] [stdout] --> src/main.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let scopes: Vec> = parsed.4; //Lines in braces [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_scopes` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scope_line_asts` [INFO] [stdout] --> src/main.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let scope_line_asts: Vec> = parsed.5; //Line ASTS but for the scopes [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_scope_line_asts` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `newlines` [INFO] [stdout] --> src/main.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let newlines: Vec = parsed.6; //Indexes of newlines [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_newlines` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `variables` is never read [INFO] [stdout] --> src/main.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | variables = execute(asts, line_asts[1].clone(), lines[1].clone(), variables, 0); //TO-DO: Replace 0 With the Line # [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/lang/keywords.rs:17:68 [INFO] [stdout] | [INFO] [stdout] 17 | if line[4].token_type.to_case(Case::Lower) == asts[line_asts[0].clone() as usize].children[0].value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `line_asts[0]` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/lang/keywords.rs:22:36 [INFO] [stdout] | [INFO] [stdout] 22 | var_depth: depth.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*depth` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/main.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | ...d: (Vec>, Vec, Vec, Vec>, Vec>, Vec>, Vec)= p... [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] [INFO] [stdout] [INFO] [stdout] warning: fields `var_type` and `var_depth` are never read [INFO] [stdout] --> src/main.rs:358:5 [INFO] [stdout] | [INFO] [stdout] 357 | struct VAR { [INFO] [stdout] | --- fields in this struct [INFO] [stdout] 358 | var_type: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 361 | var_depth: i64, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 35 | if errors.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:66:20 [INFO] [stdout] | [INFO] [stdout] 66 | println!("{}", "___________________________"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 66 - println!("{}", "___________________________"); [INFO] [stdout] 66 + println!("___________________________"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 92 | return variables; [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] 92 - return variables; [INFO] [stdout] 92 + variables [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ERROR` is never constructed [INFO] [stdout] --> src/main.rs:364:8 [INFO] [stdout] | [INFO] [stdout] 364 | struct ERROR { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `keyword_execute` is never used [INFO] [stdout] --> src/lang/keywords.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn keyword_execute() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:353:5 [INFO] [stdout] | [INFO] [stdout] 353 | return solved_ast; [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] 353 - return solved_ast; [INFO] [stdout] 353 + solved_ast [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/parser.rs:4:32 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn parse(text: &String) -> (Vec>, Vec, Vec, Vec>, Vec>, Vec>, Vec) { [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 late initialization [INFO] [stdout] --> src/main.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | let solved_ast: parser::AST; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 349 | solved_ast = ast; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `solved_ast` here [INFO] [stdout] | [INFO] [stdout] 99 ~ [INFO] [stdout] 100 | [INFO] [stdout] ... [INFO] [stdout] 348 | } [INFO] [stdout] 349 ~ let solved_ast: parser::AST = ast; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:81:16 [INFO] [stdout] | [INFO] [stdout] 81 | if !(num == "") { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `(num != "")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/main.rs:303:71 [INFO] [stdout] | [INFO] [stdout] 303 | ast.children[token_num].value = (left_value % right_value as f64).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `{ right_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: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:105:16 [INFO] [stdout] | [INFO] [stdout] 105 | if !(string == "") && !dquote && !squote { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(string != "")` [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: name `VAR` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:357:8 [INFO] [stdout] | [INFO] [stdout] 357 | struct VAR { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Var` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:205:115 [INFO] [stdout] | [INFO] [stdout] 205 | ...s(&temp_token.value)) && !(possible_keyword == "KEYWORD"){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(possible_keyword != "KEYWORD")` [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: name `ERROR` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:364:8 [INFO] [stdout] | [INFO] [stdout] 364 | struct ERROR { [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:487:8 [INFO] [stdout] | [INFO] [stdout] 487 | if !(num == "") { //Last checks in case the last character was a number (It't wont add otherwise because it would need anothe... [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `(num != "")` [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/parser.rs:496:8 [INFO] [stdout] | [INFO] [stdout] 496 | if !(string == "") { //Same but with letters [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(string != "")` [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/parser.rs:666:5 [INFO] [stdout] | [INFO] [stdout] 666 | return (lines, asts, errors, line_asts, scopes, scope_asts, newlines); [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] 666 - return (lines, asts, errors, line_asts, scopes, scope_asts, newlines); [INFO] [stdout] 666 + (lines, asts, errors, line_asts, scopes, scope_asts, newlines) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/parser.rs:4:20 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn parse(text: &String) -> (Vec>, Vec, Vec, Vec>, Vec>, Vec>, 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] 4 - pub fn parse(text: &String) -> (Vec>, Vec, Vec, Vec>, Vec>, Vec>, Vec) { [INFO] [stdout] 4 + pub fn parse(text: &str) -> (Vec>, Vec, Vec, Vec>, Vec>, Vec>, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:43:27 [INFO] [stdout] | [INFO] [stdout] 43 | newlines.push(char_num.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:47:44 [INFO] [stdout] | [INFO] [stdout] 47 | ....contains(char) && string.len() == 0) || char == '.'{ //Checks to see if the number being parsed has 2 decimal points [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `string.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: comparison to empty slice [INFO] [stdout] --> src/parser.rs:59:24 [INFO] [stdout] | [INFO] [stdout] 59 | if num == "" { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `num.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:60:106 [INFO] [stdout] | [INFO] [stdout] 60 | tokens.push(Token {token_type: "DOT".to_string(), value: ".".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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: manual implementation of an assign operation [INFO] [stdout] --> src/parser.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | string = string + (num.clone()).as_str(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `string += (num.clone()).as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/parser.rs:81:18 [INFO] [stdout] | [INFO] [stdout] 81 | if !(num == "") { [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `num.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:100:118 [INFO] [stdout] | [INFO] [stdout] 100 | ...contains(char) && string.len() != 0)) && !dquote && !squote { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!string.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/parser.rs:105:18 [INFO] [stdout] | [INFO] [stdout] 105 | if !(string == "") && !dquote && !squote { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `string.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:128:95 [INFO] [stdout] | [INFO] [stdout] 128 | tokens.push(Token {token_type: "PLUS".to_string(), value: "+".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:132:96 [INFO] [stdout] | [INFO] [stdout] 132 | tokens.push(Token {token_type: "MINUS".to_string(), value: "-".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:136:94 [INFO] [stdout] | [INFO] [stdout] 136 | tokens.push(Token {token_type: "MUL".to_string(), value: "*".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:140:94 [INFO] [stdout] | [INFO] [stdout] 140 | tokens.push(Token {token_type: "MOD".to_string(), value: "%".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:146:101 [INFO] [stdout] | [INFO] [stdout] 146 | tokens.push(Token {token_type: "DODIV".to_string(), value: "//".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:149:98 [INFO] [stdout] | [INFO] [stdout] 149 | tokens.push(Token {token_type: "DIV".to_string(), value: "/".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:154:95 [INFO] [stdout] | [INFO] [stdout] 154 | tokens.push(Token {token_type: "TTPO".to_string(), value: "^".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:158:98 [INFO] [stdout] | [INFO] [stdout] 158 | tokens.push(Token {token_type: "BSLASH".to_string(), value: "\\".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:162:95 [INFO] [stdout] | [INFO] [stdout] 162 | tokens.push(Token {token_type: "LPAR".to_string(), value: "(".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:169:95 [INFO] [stdout] | [INFO] [stdout] 169 | tokens.push(Token {token_type: "RPAR".to_string(), value: ")".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:172:16 [INFO] [stdout] | [INFO] [stdout] 172 | if lpars.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lpars.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/parser.rs:178:72 [INFO] [stdout] | [INFO] [stdout] 178 | paren_sets.push(ParPairs{l: lpars[lpars.len() - 1].par, r: (tokens.len() - 1).try_into().unwrap()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [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/parser.rs:212:24 [INFO] [stdout] | [INFO] [stdout] 212 | if asts[asts.len() - 1].children.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!asts[asts.len() - 1].children.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:232:96 [INFO] [stdout] | [INFO] [stdout] 232 | tokens.push(Token {token_type: "COLON".to_string(), value: ":".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:236:100 [INFO] [stdout] | [INFO] [stdout] 236 | tokens.push(Token {token_type: "SEMICOLON".to_string(), value: ";".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:242:99 [INFO] [stdout] | [INFO] [stdout] 242 | tokens.push(Token {token_type: "AND".to_string(), value: "&&".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:245:103 [INFO] [stdout] | [INFO] [stdout] 245 | tokens.push(Token {token_type: "APERSAND".to_string(), value: "&".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:252:98 [INFO] [stdout] | [INFO] [stdout] 252 | tokens.push(Token {token_type: "OR".to_string(), value: "||".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:255:99 [INFO] [stdout] | [INFO] [stdout] 255 | tokens.push(Token {token_type: "LINE".to_string(), value: "|".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:260:94 [INFO] [stdout] | [INFO] [stdout] 260 | tokens.push(Token {token_type: "NOT".to_string(), value: "!".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:264:98 [INFO] [stdout] | [INFO] [stdout] 264 | tokens.push(Token {token_type: "GREATER".to_string(), value: ">".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:268:95 [INFO] [stdout] | [INFO] [stdout] 268 | tokens.push(Token {token_type: "LESS".to_string(), value: "<".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:272:96 [INFO] [stdout] | [INFO] [stdout] 272 | tokens.push(Token {token_type: "COMMA".to_string(), value: ",".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:278:102 [INFO] [stdout] | [INFO] [stdout] 278 | tokens.push(Token {token_type: "DEQUAL".to_string(), value: "==".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:282:102 [INFO] [stdout] | [INFO] [stdout] 282 | tokens.push(Token {token_type: "NEQUAL".to_string(), value: "!=".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:285:100 [INFO] [stdout] | [INFO] [stdout] 285 | tokens.push(Token {token_type: "EQUAL".to_string(), value: "=".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:290:97 [INFO] [stdout] | [INFO] [stdout] 290 | tokens.push(Token {token_type: "LBRACE".to_string(), value: "{".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:296:97 [INFO] [stdout] | [INFO] [stdout] 296 | tokens.push(Token {token_type: "RBRACE".to_string(), value: "}".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:299:16 [INFO] [stdout] | [INFO] [stdout] 299 | if lbraces.len() == 0 { //Checks to see if there are any left braces to match the right brace [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lbraces.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/parser.rs:304:76 [INFO] [stdout] | [INFO] [stdout] 304 | brace_sets.push(ParPairs{l: lbraces[lbraces.len() - 1].par, r: (tokens.len() - 1).try_into().unwrap()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:315:16 [INFO] [stdout] | [INFO] [stdout] 315 | if temp.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `temp.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:318:103 [INFO] [stdout] | [INFO] [stdout] 318 | tokens.push(Token {token_type: "EBRACES".to_string(), value: "{}".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:325:113 [INFO] [stdout] | [INFO] [stdout] 325 | ....len() - 1).to_string(), start: char_num.clone() - temp_len as i64}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:332:99 [INFO] [stdout] | [INFO] [stdout] 332 | tokens.push(Token {token_type: "LBRACKET".to_string(), value: "[".to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:338:99 [INFO] [stdout] | [INFO] [stdout] 338 | tokens.push(Token {token_type: "RBRACKET".to_string(), value: "]".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:340:16 [INFO] [stdout] | [INFO] [stdout] 340 | if lbrackets.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lbrackets.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `usize` [INFO] [stdout] --> src/parser.rs:345:82 [INFO] [stdout] | [INFO] [stdout] 345 | bracket_sets.push(ParPairs{l: lbrackets[lbrackets.len() - 1].par, r: (tokens.len() - 1).try_into().unwrap()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:355:17 [INFO] [stdout] | [INFO] [stdout] 355 | if temp.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `temp.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:358:109 [INFO] [stdout] | [INFO] [stdout] 358 | tokens.push(Token {token_type: "EBRACKETS".to_string(), value: "[]".to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:366:112 [INFO] [stdout] | [INFO] [stdout] 366 | ....len() - 1).to_string(), start: char_num.clone() - temp_len as i64}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:376:99 [INFO] [stdout] | [INFO] [stdout] 376 | tokens.push(Token {token_type: "CHAR".to_string(), value: '"'.to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:380:101 [INFO] [stdout] | [INFO] [stdout] 380 | tokens.push(Token {token_type: "DQUOTE".to_string(), value: '"'.to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:395:127 [INFO] [stdout] | [INFO] [stdout] 395 | ...ng_len - 1].to_string(), start: char_num.clone() - string_len as i64}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:412:100 [INFO] [stdout] | [INFO] [stdout] 412 | tokens.push(Token {token_type: "CHAR".to_string(), value: '\''.to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:416:102 [INFO] [stdout] | [INFO] [stdout] 416 | tokens.push(Token {token_type: "SQUOTE".to_string(), value: '\''.to_string(), start: char_num.clone()}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/parser.rs:428:138 [INFO] [stdout] | [INFO] [stdout] 428 | ...1).unwrap().to_string(), start: char_num.clone() - 1}); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `char_num` [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` statement can be collapsed [INFO] [stdout] --> src/parser.rs:442:9 [INFO] [stdout] | [INFO] [stdout] 442 | / if esc_char_last { [INFO] [stdout] 443 | | [INFO] [stdout] 444 | | if char == 'n' { [INFO] [stdout] 445 | | string = string[0..string.len() - 1].to_string(); [INFO] [stdout] ... | [INFO] [stdout] 452 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 442 ~ if esc_char_last [INFO] [stdout] 443 | [INFO] [stdout] 444 ~ && char == 'n' { [INFO] [stdout] 445 | string = string[0..string.len() - 1].to_string(); [INFO] [stdout] ... [INFO] [stdout] 450 | [INFO] [stdout] 451 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/parser.rs:447:17 [INFO] [stdout] | [INFO] [stdout] 447 | string = string + "\n"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `string += "\n"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/parser.rs:462:13 [INFO] [stdout] | [INFO] [stdout] 462 | / if char == '\\' { [INFO] [stdout] 463 | | esc_char_last = true; [INFO] [stdout] ... | [INFO] [stdout] 467 | | esc_char_last = false; [INFO] [stdout] 468 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `esc_char_last = char == '\\';` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/parser.rs:487:10 [INFO] [stdout] | [INFO] [stdout] 487 | if !(num == "") { //Last checks in case the last character was a number (It't wont add otherwise because it would need anothe... [INFO] [stdout] | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `num.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/parser.rs:496:10 [INFO] [stdout] | [INFO] [stdout] 496 | if !(string == "") { //Same but with letters [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `string.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i64` is unnecessary [INFO] [stdout] --> src/parser.rs:504:109 [INFO] [stdout] | [INFO] [stdout] 504 | tokens.push(Token {token_type: "CHAR".to_string(), value: string.clone(), start: char_num - 1 as i64}); [INFO] [stdout] | ^^^^^^^^ help: try: `1_i64` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:573:8 [INFO] [stdout] | [INFO] [stdout] 573 | if lpars.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lpars.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/parser.rs:574:41 [INFO] [stdout] | [INFO] [stdout] 574 | errors.push(PErr{error:4, char: lpars[0].char as i64}); //ERROR [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `lpars[0].char` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:577:8 [INFO] [stdout] | [INFO] [stdout] 577 | if lbraces.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lbraces.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/parser.rs:578:41 [INFO] [stdout] | [INFO] [stdout] 578 | errors.push(PErr{error:5, char: lbraces[0].char as i64}); //ERROR [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `lbraces[0].char` [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: length comparison to zero [INFO] [stdout] --> src/parser.rs:581:8 [INFO] [stdout] | [INFO] [stdout] 581 | if lbrackets.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lbrackets.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/parser.rs:582:41 [INFO] [stdout] | [INFO] [stdout] 582 | errors.push(PErr{error:6, char: lbrackets[0].char as i64}); //ERROR [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lbrackets[0].char` [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 creates an owned instance just for comparison [INFO] [stdout] --> src/parser.rs:610:32 [INFO] [stdout] | [INFO] [stdout] 610 | if i.token_type == String::from("AST") || i.token_type == String::from("ARGS") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `"AST"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/parser.rs:610:71 [INFO] [stdout] | [INFO] [stdout] 610 | if i.token_type == String::from("AST") || i.token_type == String::from("ARGS") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"ARGS"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/parser.rs:649:40 [INFO] [stdout] | [INFO] [stdout] 649 | if k.token_type == String::from("AST") || k.token_type == String::from("ARGS") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `"AST"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/parser.rs:649:79 [INFO] [stdout] | [INFO] [stdout] 649 | if k.token_type == String::from("AST") || k.token_type == String::from("ARGS") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"ARGS"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `AST` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:678:12 [INFO] [stdout] | [INFO] [stdout] 678 | pub struct AST { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Ast` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lang/keywords.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | return variables; [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] 46 - return variables; [INFO] [stdout] 46 + variables [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/lang/keywords.rs:9:49 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &Vec, depth: &i64) -> 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] 9 - pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &Vec, depth: &i64) -> Vec { [INFO] [stdout] 9 + pub fn var_check(mut variables: Vec, line: &[Token], asts: &Vec, line_asts: &Vec, depth: &i64) -> 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/lang/keywords.rs:9:68 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &Vec, depth: &i64) -> 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] 9 - pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &Vec, depth: &i64) -> Vec { [INFO] [stdout] 9 + pub fn var_check(mut variables: Vec, line: &Vec, asts: &[AST], line_asts: &Vec, depth: &i64) -> 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/lang/keywords.rs:9:90 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &Vec, depth: &i64) -> 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] 9 - pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &Vec, depth: &i64) -> Vec { [INFO] [stdout] 9 + pub fn var_check(mut variables: Vec, line: &Vec, asts: &Vec, line_asts: &[i64], depth: &i64) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/lang/keywords.rs:17:68 [INFO] [stdout] | [INFO] [stdout] 17 | if line[4].token_type.to_case(Case::Lower) == asts[line_asts[0].clone() as usize].children[0].value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `line_asts[0]` [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 `i64` which implements the `Copy` trait [INFO] [stdout] --> src/lang/keywords.rs:22:36 [INFO] [stdout] | [INFO] [stdout] 22 | var_depth: depth.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*depth` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/main.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | ...d: (Vec>, Vec, Vec, Vec>, Vec>, Vec>, Vec)= p... [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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 35 | if errors.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/main.rs:66:20 [INFO] [stdout] | [INFO] [stdout] 66 | println!("{}", "___________________________"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 66 - println!("{}", "___________________________"); [INFO] [stdout] 66 + println!("___________________________"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 92 | return variables; [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] 92 - return variables; [INFO] [stdout] 92 + variables [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:353:5 [INFO] [stdout] | [INFO] [stdout] 353 | return solved_ast; [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] 353 - return solved_ast; [INFO] [stdout] 353 + solved_ast [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | let solved_ast: parser::AST; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 349 | solved_ast = ast; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `solved_ast` here [INFO] [stdout] | [INFO] [stdout] 99 ~ [INFO] [stdout] 100 | [INFO] [stdout] ... [INFO] [stdout] 348 | } [INFO] [stdout] 349 ~ let solved_ast: parser::AST = ast; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/main.rs:303:71 [INFO] [stdout] | [INFO] [stdout] 303 | ast.children[token_num].value = (left_value % right_value as f64).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `{ right_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: name `VAR` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:357:8 [INFO] [stdout] | [INFO] [stdout] 357 | struct VAR { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Var` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ERROR` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:364:8 [INFO] [stdout] | [INFO] [stdout] 364 | struct ERROR { [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.80s [INFO] running `Command { std: "docker" "inspect" "4ef3cdfcc9baf2e26eaca4e2b4c724fba4bf21684ada6a201ef7767f09afe9d2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4ef3cdfcc9baf2e26eaca4e2b4c724fba4bf21684ada6a201ef7767f09afe9d2", kill_on_drop: false }` [INFO] [stdout] 4ef3cdfcc9baf2e26eaca4e2b4c724fba4bf21684ada6a201ef7767f09afe9d2