[INFO] cloning repository https://github.com/HogeyDev/Ignis [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/HogeyDev/Ignis" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FHogeyDev%2FIgnis", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FHogeyDev%2FIgnis'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] bd458a2e91cc61dab4bfd97d81207df4f1baf898 [INFO] linting HogeyDev/Ignis against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FHogeyDev%2FIgnis" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/HogeyDev/Ignis [INFO] finished tweaking git repo https://github.com/HogeyDev/Ignis [INFO] tweaked toml for git repo https://github.com/HogeyDev/Ignis written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/HogeyDev/Ignis 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/HogeyDev/Ignis already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 725b611d5972b288531d9f85a833e1d63603f08a10155fd540d10af6e568139d [INFO] running `Command { std: "docker" "start" "-a" "725b611d5972b288531d9f85a833e1d63603f08a10155fd540d10af6e568139d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "725b611d5972b288531d9f85a833e1d63603f08a10155fd540d10af6e568139d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "725b611d5972b288531d9f85a833e1d63603f08a10155fd540d10af6e568139d", kill_on_drop: false }` [INFO] [stdout] 725b611d5972b288531d9f85a833e1d63603f08a10155fd540d10af6e568139d [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 08e853f50d97664154fbf2fdd7b12f25f0fac533f73545caa9ef45d2fda830b2 [INFO] running `Command { std: "docker" "start" "-a" "08e853f50d97664154fbf2fdd7b12f25f0fac533f73545caa9ef45d2fda830b2", kill_on_drop: false }` [INFO] [stderr] Checking ignis v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `pre` [INFO] [stdout] --> src/codegen.rs:424:17 [INFO] [stdout] | [INFO] [stdout] 424 | let pre = scope.stack_size; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_pre` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/codegen.rs:425:17 [INFO] [stdout] | [INFO] [stdout] 425 | let x = scope.add_variable(name.clone(), variable_type, is_static, width); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pre` [INFO] [stdout] --> src/codegen.rs:424:17 [INFO] [stdout] | [INFO] [stdout] 424 | let pre = scope.stack_size; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_pre` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/codegen.rs:425:17 [INFO] [stdout] | [INFO] [stdout] 425 | let x = scope.add_variable(name.clone(), variable_type, is_static, width); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PreProcessor` [INFO] [stdout] --> src/preprocessor.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | / pub fn new() -> PreProcessor { [INFO] [stdout] 11 | | PreProcessor { [INFO] [stdout] 12 | | typedef: Vec::new(), [INFO] [stdout] 13 | | definitions: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 16 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 9 + impl Default for PreProcessor { [INFO] [stdout] 10 + fn default() -> Self { [INFO] [stdout] 11 + Self::new() [INFO] [stdout] 12 + } [INFO] [stdout] 13 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PreProcessor` [INFO] [stdout] --> src/preprocessor.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | / pub fn new() -> PreProcessor { [INFO] [stdout] 11 | | PreProcessor { [INFO] [stdout] 12 | | typedef: Vec::new(), [INFO] [stdout] 13 | | definitions: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 16 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 9 + impl Default for PreProcessor { [INFO] [stdout] 10 + fn default() -> Self { [INFO] [stdout] 11 + Self::new() [INFO] [stdout] 12 + } [INFO] [stdout] 13 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/modulizer.rs:8:20 [INFO] [stdout] | [INFO] [stdout] 8 | pub functions: Vec<(String, String, Vec<(String, String)>)>, // [NAME, RETURN, [PARAM, TYPE]] [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/modulizer.rs:8:20 [INFO] [stdout] | [INFO] [stdout] 8 | pub functions: Vec<(String, String, Vec<(String, String)>)>, // [NAME, RETURN, [PARAM, TYPE]] [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: calls to `push` immediately after creation [INFO] [stdout] --> src/codegen.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | / let mut paths = Vec::new(); [INFO] [stdout] 31 | | paths.push(program_config.root_path.clone() + "/" + path_with_ending.as_str()); [INFO] [stdout] 32 | | paths.push(program_config.std_path.clone() + "/" + path_with_ending.as_str()); [INFO] [stdout] | |__________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let paths = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `arguments.get(0)` [INFO] [stdout] --> src/codegen.rs:67:42 [INFO] [stdout] | [INFO] [stdout] 67 | ... let type_string = match *arguments.get(0).expect("sizeof expected a type to be passed, but none were supplied").clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `arguments.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/codegen.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | / let mut paths = Vec::new(); [INFO] [stdout] 31 | | paths.push(program_config.root_path.clone() + "/" + path_with_ending.as_str()); [INFO] [stdout] 32 | | paths.push(program_config.std_path.clone() + "/" + path_with_ending.as_str()); [INFO] [stdout] | |__________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let paths = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `arguments.get(0)` [INFO] [stdout] --> src/codegen.rs:67:42 [INFO] [stdout] | [INFO] [stdout] 67 | ... let type_string = match *arguments.get(0).expect("sizeof expected a type to be passed, but none were supplied").clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `arguments.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/codegen.rs:342:25 [INFO] [stdout] | [INFO] [stdout] 342 | / match *typing { [INFO] [stdout] 343 | | // Type::Pointer(_) => { [INFO] [stdout] 344 | | _ => { [INFO] [stdout] 345 | | let movement = move_on_stack(scope, typing.clone(), ("rax", 0), ("rsp", 0)); [INFO] [stdout] ... | [INFO] [stdout] 353 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using the match body instead [INFO] [stdout] | [INFO] [stdout] 342 ~ { [INFO] [stdout] 343 + let movement = move_on_stack(scope, typing.clone(), ("rax", 0), ("rsp", 0)); [INFO] [stdout] 344 + // scope.stack_size += size; [INFO] [stdout] 345 + format!(";movingSTART\n{movement};movingEND\n") [INFO] [stdout] 346 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its body itself [INFO] [stdout] --> src/codegen.rs:342:25 [INFO] [stdout] | [INFO] [stdout] 342 | / match *typing { [INFO] [stdout] 343 | | // Type::Pointer(_) => { [INFO] [stdout] 344 | | _ => { [INFO] [stdout] 345 | | let movement = move_on_stack(scope, typing.clone(), ("rax", 0), ("rsp", 0)); [INFO] [stdout] ... | [INFO] [stdout] 353 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using the match body instead [INFO] [stdout] | [INFO] [stdout] 342 ~ { [INFO] [stdout] 343 + let movement = move_on_stack(scope, typing.clone(), ("rax", 0), ("rsp", 0)); [INFO] [stdout] 344 + // scope.stack_size += size; [INFO] [stdout] 345 + format!(";movingSTART\n{movement};movingEND\n") [INFO] [stdout] 346 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/codegen.rs:563:75 [INFO] [stdout] | [INFO] [stdout] 563 | for (_, (member_name, member_type)) in member_types.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 563 - for (_, (member_name, member_type)) in member_types.iter().enumerate() { [INFO] [stdout] 563 + for (member_name, member_type) in member_types.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/codegen.rs:563:75 [INFO] [stdout] | [INFO] [stdout] 563 | for (_, (member_name, member_type)) in member_types.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 563 - for (_, (member_name, member_type)) in member_types.iter().enumerate() { [INFO] [stdout] 563 + for (member_name, member_type) in member_types.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/compile.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 37 | let preprocessed = preprocessor.preprocess(parsed).0; [INFO] [stdout] | ----------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 38 | preprocessed [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 37 ~ [INFO] [stdout] 38 ~ preprocessor.preprocess(parsed).0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/compile.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 37 | let preprocessed = preprocessor.preprocess(parsed).0; [INFO] [stdout] | ----------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 38 | preprocessed [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 37 ~ [INFO] [stdout] 38 ~ preprocessor.preprocess(parsed).0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/config.rs:44:63 [INFO] [stdout] | [INFO] [stdout] 44 | if config.std_path.as_bytes().first().unwrap_or(&0u8) != &('/' as u8) { [INFO] [stdout] | ^^^^^^^^^^^ help: use a byte literal instead: `b'/'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/parser.rs:1:20 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{process, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/config.rs:44:63 [INFO] [stdout] | [INFO] [stdout] 44 | if config.std_path.as_bytes().first().unwrap_or(&0u8) != &('/' as u8) { [INFO] [stdout] | ^^^^^^^^^^^ help: use a byte literal instead: `b'/'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/parser.rs:1:20 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{process, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `parser::AST` [INFO] [stdout] --> src/parser.rs:137:5 [INFO] [stdout] | [INFO] [stdout] 137 | / pub fn to_string(&self) -> String { [INFO] [stdout] 138 | | match self { [INFO] [stdout] 139 | | AST::Null => "".to_string(), [INFO] [stdout] 140 | | AST::Integer(x) => x.to_string(), [INFO] [stdout] ... | [INFO] [stdout] 200 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `parser::AST` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `parser::AST` [INFO] [stdout] --> src/parser.rs:137:5 [INFO] [stdout] | [INFO] [stdout] 137 | / pub fn to_string(&self) -> String { [INFO] [stdout] 138 | | match self { [INFO] [stdout] 139 | | AST::Null => "".to_string(), [INFO] [stdout] 140 | | AST::Integer(x) => x.to_string(), [INFO] [stdout] ... | [INFO] [stdout] 200 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `parser::AST` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:183:20 [INFO] [stdout] | [INFO] [stdout] 183 | if arguments.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!arguments.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: accessing first element with `token_list.get(0)` [INFO] [stdout] --> src/parser.rs:214:28 [INFO] [stdout] | [INFO] [stdout] 214 | current_token: token_list.get(0).unwrap_or(&Token { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `token_list.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:183:20 [INFO] [stdout] | [INFO] [stdout] 183 | if arguments.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!arguments.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: accessing first element with `token_list.get(0)` [INFO] [stdout] --> src/parser.rs:214:28 [INFO] [stdout] | [INFO] [stdout] 214 | current_token: token_list.get(0).unwrap_or(&Token { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `token_list.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:541:28 [INFO] [stdout] | [INFO] [stdout] 541 | if string_buffer.len() > 0 { expansion.push((false, string_buffer.clone())); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!string_buffer.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:549:20 [INFO] [stdout] | [INFO] [stdout] 549 | if string_buffer.len() > 0 { expansion.push((false, string_buffer)); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!string_buffer.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: this `if` statement can be collapsed [INFO] [stdout] --> src/parser.rs:552:20 [INFO] [stdout] | [INFO] [stdout] 552 | } else if self.current_token.token_type == TokenType::Identifier { [INFO] [stdout] | ____________________^ [INFO] [stdout] 553 | | if self.peek(1).token_type == TokenType::LeftParenthesis { [INFO] [stdout] 554 | | // function call [INFO] [stdout] 555 | | let name = self.current_token.value.clone(); [INFO] [stdout] ... | [INFO] [stdout] 584 | | }*/ [INFO] [stdout] 585 | | } [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] 552 ~ } else if self.current_token.token_type == TokenType::Identifier [INFO] [stdout] 553 ~ && self.peek(1).token_type == TokenType::LeftParenthesis { [INFO] [stdout] 554 | // function call [INFO] [stdout] ... [INFO] [stdout] 583 | stmt = Some(Box::new(AST::VariableAssignment { name, value })); [INFO] [stdout] 584 ~ }*/ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:541:28 [INFO] [stdout] | [INFO] [stdout] 541 | if string_buffer.len() > 0 { expansion.push((false, string_buffer.clone())); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!string_buffer.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:549:20 [INFO] [stdout] | [INFO] [stdout] 549 | if string_buffer.len() > 0 { expansion.push((false, string_buffer)); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!string_buffer.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: this `if` statement can be collapsed [INFO] [stdout] --> src/parser.rs:552:20 [INFO] [stdout] | [INFO] [stdout] 552 | } else if self.current_token.token_type == TokenType::Identifier { [INFO] [stdout] | ____________________^ [INFO] [stdout] 553 | | if self.peek(1).token_type == TokenType::LeftParenthesis { [INFO] [stdout] 554 | | // function call [INFO] [stdout] 555 | | let name = self.current_token.value.clone(); [INFO] [stdout] ... | [INFO] [stdout] 584 | | }*/ [INFO] [stdout] 585 | | } [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] 552 ~ } else if self.current_token.token_type == TokenType::Identifier [INFO] [stdout] 553 ~ && self.peek(1).token_type == TokenType::LeftParenthesis { [INFO] [stdout] 554 | // function call [INFO] [stdout] ... [INFO] [stdout] 583 | stmt = Some(Box::new(AST::VariableAssignment { name, value })); [INFO] [stdout] 584 ~ }*/ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:260:9 [INFO] [stdout] | [INFO] [stdout] 260 | return self.source.as_bytes()[self.index + offset] as char; [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] 260 - return self.source.as_bytes()[self.index + offset] as char; [INFO] [stdout] 260 + self.source.as_bytes()[self.index + offset] as char [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer.rs:260:9 [INFO] [stdout] | [INFO] [stdout] 260 | return self.source.as_bytes()[self.index + offset] as char; [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] 260 - return self.source.as_bytes()[self.index + offset] as char; [INFO] [stdout] 260 + self.source.as_bytes()[self.index + offset] as char [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scope.rs:10:20 [INFO] [stdout] | [INFO] [stdout] 10 | pub functions: Vec<(String, String, Vec<(String, String)>)>, // [NAME, TYPE, [[ARG0, TYPE], [ARG1, TYPE], ... [ARGN, TYPE]]] [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scope.rs:10:20 [INFO] [stdout] | [INFO] [stdout] 10 | pub functions: Vec<(String, String, Vec<(String, String)>)>, // [NAME, TYPE, [[ARG0, TYPE], [ARG1, TYPE], ... [ARGN, TYPE]]] [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: consider using `sort_by_key` [INFO] [stdout] --> src/scope.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | self.strings.sort_by(|a, b| a.1.cmp(&b.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 183 - self.strings.sort_by(|a, b| a.1.cmp(&b.1)); [INFO] [stdout] 183 + self.strings.sort_by_key(|a| a.1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/scope.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | self.strings.sort_by(|a, b| a.1.cmp(&b.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 183 - self.strings.sort_by(|a, b| a.1.cmp(&b.1)); [INFO] [stdout] 183 + self.strings.sort_by_key(|a| a.1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `types::Type` [INFO] [stdout] --> src/types.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn to_string(&self) -> String { [INFO] [stdout] 23 | | match self.clone() { [INFO] [stdout] 24 | | Self::Primative(id) => id, [INFO] [stdout] 25 | | Self::FixedArray(size, sub) => format!("[{}]{}", size, sub.to_string()), [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `types::Type` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/types.rs:57:44 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn get_type_size(scope: &ScopeContext, comp: Box) -> Result { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] = note: `#[warn(clippy::boxed_local)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `types::Type` [INFO] [stdout] --> src/types.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn to_string(&self) -> String { [INFO] [stdout] 23 | | match self.clone() { [INFO] [stdout] 24 | | Self::Primative(id) => id, [INFO] [stdout] 25 | | Self::FixedArray(size, sub) => format!("[{}]{}", size, sub.to_string()), [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `types::Type` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/types.rs:81:57 [INFO] [stdout] | [INFO] [stdout] 81 | AST::String(_) => string_to_collapsed_type_tree(format!("[]char"), scope), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"[]char".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/types.rs:57:44 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn get_type_size(scope: &ScopeContext, comp: Box) -> Result { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] = note: `#[warn(clippy::boxed_local)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/types.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | let _member_types = members.iter().map(|x| x).for_each(|x| println!("{:?}", x)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 117 - let _member_types = members.iter().map(|x| x).for_each(|x| println!("{:?}", x)); [INFO] [stdout] 117 + members.iter().map(|x| x).for_each(|x| println!("{:?}", x)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/types.rs:117:47 [INFO] [stdout] | [INFO] [stdout] 117 | let _member_types = members.iter().map(|x| x).for_each(|x| println!("{:?}", x)); [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/types.rs:81:57 [INFO] [stdout] | [INFO] [stdout] 81 | AST::String(_) => string_to_collapsed_type_tree(format!("[]char"), scope), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"[]char".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/types.rs:150:27 [INFO] [stdout] | [INFO] [stdout] 150 | pub fn collapse_type_tree(tree: Box) -> Result, String> { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/types.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | let _member_types = members.iter().map(|x| x).for_each(|x| println!("{:?}", x)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 117 - let _member_types = members.iter().map(|x| x).for_each(|x| println!("{:?}", x)); [INFO] [stdout] 117 + members.iter().map(|x| x).for_each(|x| println!("{:?}", x)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/types.rs:117:47 [INFO] [stdout] | [INFO] [stdout] 117 | let _member_types = members.iter().map(|x| x).for_each(|x| println!("{:?}", x)); [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: local variable doesn't need to be boxed here [INFO] [stdout] --> src/types.rs:150:27 [INFO] [stdout] | [INFO] [stdout] 150 | pub fn collapse_type_tree(tree: Box) -> Result, String> { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EOS` contains a capitalized acronym [INFO] [stdout] --> src/types.rs:217:5 [INFO] [stdout] | [INFO] [stdout] 217 | EOS, // end of stream [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Eos` [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: name `EOS` contains a capitalized acronym [INFO] [stdout] --> src/types.rs:217:5 [INFO] [stdout] | [INFO] [stdout] 217 | EOS, // end of stream [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Eos` [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: length comparison to zero [INFO] [stdout] --> src/types.rs:294:12 [INFO] [stdout] | [INFO] [stdout] 294 | if tokens.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tokens.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types.rs:378:27 [INFO] [stdout] | [INFO] [stdout] 378 | while self.current_token != StrTokType::Comma [INFO] [stdout] | ___________________________^ [INFO] [stdout] 379 | | && self.current_token != StrTokType::RightBrace [INFO] [stdout] 380 | | && self.current_token != StrTokType::Comma [INFO] [stdout] | |__________________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 378 - while self.current_token != StrTokType::Comma [INFO] [stdout] 379 - && self.current_token != StrTokType::RightBrace [INFO] [stdout] 380 - && self.current_token != StrTokType::Comma [INFO] [stdout] 378 + while !(self.current_token == StrTokType::Comma || self.current_token == StrTokType::RightBrace) [INFO] [stdout] | [INFO] [stdout] 378 - while self.current_token != StrTokType::Comma [INFO] [stdout] 379 - && self.current_token != StrTokType::RightBrace [INFO] [stdout] 380 - && self.current_token != StrTokType::Comma [INFO] [stdout] 378 + while self.current_token != StrTokType::Comma && self.current_token != StrTokType::RightBrace [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/types.rs:294:12 [INFO] [stdout] | [INFO] [stdout] 294 | if tokens.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tokens.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types.rs:378:27 [INFO] [stdout] | [INFO] [stdout] 378 | while self.current_token != StrTokType::Comma [INFO] [stdout] | ___________________________^ [INFO] [stdout] 379 | | && self.current_token != StrTokType::RightBrace [INFO] [stdout] 380 | | && self.current_token != StrTokType::Comma [INFO] [stdout] | |__________________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 378 - while self.current_token != StrTokType::Comma [INFO] [stdout] 379 - && self.current_token != StrTokType::RightBrace [INFO] [stdout] 380 - && self.current_token != StrTokType::Comma [INFO] [stdout] 378 + while !(self.current_token == StrTokType::Comma || self.current_token == StrTokType::RightBrace) [INFO] [stdout] | [INFO] [stdout] 378 - while self.current_token != StrTokType::Comma [INFO] [stdout] 379 - && self.current_token != StrTokType::RightBrace [INFO] [stdout] 380 - && self.current_token != StrTokType::Comma [INFO] [stdout] 378 + while self.current_token != StrTokType::Comma && self.current_token != StrTokType::RightBrace [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/util.rs:242:5 [INFO] [stdout] | [INFO] [stdout] 242 | return res; [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] 242 - return res; [INFO] [stdout] 242 + res [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/util.rs:228:16 [INFO] [stdout] | [INFO] [stdout] 228 | if buf.len() > 0 { res.push((true, buf.clone())); } [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!buf.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: unneeded `return` statement [INFO] [stdout] --> src/util.rs:242:5 [INFO] [stdout] | [INFO] [stdout] 242 | return res; [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] 242 - return res; [INFO] [stdout] 242 + res [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/util.rs:228:16 [INFO] [stdout] | [INFO] [stdout] 228 | if buf.len() > 0 { res.push((true, buf.clone())); } [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!buf.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: you should consider adding a `Default` implementation for `AsmBlock` [INFO] [stdout] --> src/asm.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | / pub fn new() -> Self { [INFO] [stdout] 59 | | Self { [INFO] [stdout] 60 | | sections: HashMap::new(), [INFO] [stdout] 61 | | } [INFO] [stdout] 62 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 57 + impl Default for AsmBlock { [INFO] [stdout] 58 + fn default() -> Self { [INFO] [stdout] 59 + Self::new() [INFO] [stdout] 60 + } [INFO] [stdout] 61 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/asm.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | / if !self.sections.contains_key(§ion) { [INFO] [stdout] 65 | | self.sections.insert(section, Vec::new()); [INFO] [stdout] 66 | | } [INFO] [stdout] | |_________^ help: try: `self.sections.entry(section).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AsmBlock` [INFO] [stdout] --> src/asm.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | / pub fn new() -> Self { [INFO] [stdout] 59 | | Self { [INFO] [stdout] 60 | | sections: HashMap::new(), [INFO] [stdout] 61 | | } [INFO] [stdout] 62 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 57 + impl Default for AsmBlock { [INFO] [stdout] 58 + fn default() -> Self { [INFO] [stdout] 59 + Self::new() [INFO] [stdout] 60 + } [INFO] [stdout] 61 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/asm.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | / if !self.sections.contains_key(§ion) { [INFO] [stdout] 65 | | self.sections.insert(section, Vec::new()); [INFO] [stdout] 66 | | } [INFO] [stdout] | |_________^ help: try: `self.sections.entry(section).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cli.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | return self.flags.contains(&flag.to_string()); [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] 49 - return self.flags.contains(&flag.to_string()); [INFO] [stdout] 49 + self.flags.contains(&flag.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/cli.rs:49:36 [INFO] [stdout] | [INFO] [stdout] 49 | return self.flags.contains(&flag.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `flag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cli.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | return self.options.get(&flag.to_string()).unwrap_or(&default_value.to_string()).to_string(); [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] 52 - return self.options.get(&flag.to_string()).unwrap_or(&default_value.to_string()).to_string(); [INFO] [stdout] 52 + self.options.get(&flag.to_string()).unwrap_or(&default_value.to_string()).to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/cli.rs:52:33 [INFO] [stdout] | [INFO] [stdout] 52 | return self.options.get(&flag.to_string()).unwrap_or(&default_value.to_string()).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `flag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | if cli_parser.arguments.len() == 0 || cli_parser.arguments.len() > 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `cli_parser.arguments.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: unneeded `return` statement [INFO] [stdout] --> src/cli.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | return self.flags.contains(&flag.to_string()); [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] 49 - return self.flags.contains(&flag.to_string()); [INFO] [stdout] 49 + self.flags.contains(&flag.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/cli.rs:49:36 [INFO] [stdout] | [INFO] [stdout] 49 | return self.flags.contains(&flag.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `flag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cli.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | return self.options.get(&flag.to_string()).unwrap_or(&default_value.to_string()).to_string(); [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] 52 - return self.options.get(&flag.to_string()).unwrap_or(&default_value.to_string()).to_string(); [INFO] [stdout] 52 + self.options.get(&flag.to_string()).unwrap_or(&default_value.to_string()).to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/cli.rs:52:33 [INFO] [stdout] | [INFO] [stdout] 52 | return self.options.get(&flag.to_string()).unwrap_or(&default_value.to_string()).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `flag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | if cli_parser.arguments.len() == 0 || cli_parser.arguments.len() > 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `cli_parser.arguments.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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.74s [INFO] running `Command { std: "docker" "inspect" "08e853f50d97664154fbf2fdd7b12f25f0fac533f73545caa9ef45d2fda830b2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "08e853f50d97664154fbf2fdd7b12f25f0fac533f73545caa9ef45d2fda830b2", kill_on_drop: false }` [INFO] [stdout] 08e853f50d97664154fbf2fdd7b12f25f0fac533f73545caa9ef45d2fda830b2