[INFO] cloning repository https://github.com/jaburns/smb3k [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/jaburns/smb3k" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjaburns%2Fsmb3k", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjaburns%2Fsmb3k'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 2c94b651226ba7c449bd5b2f27596b01743b28ff [INFO] linting jaburns/smb3k against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjaburns%2Fsmb3k" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/jaburns/smb3k [INFO] finished tweaking git repo https://github.com/jaburns/smb3k [INFO] tweaked toml for git repo https://github.com/jaburns/smb3k written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/jaburns/smb3k 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/jaburns/smb3k 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] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 7876b960a3a2c123c27e920c50984f6b5bf6f3bf2711b5ff267e8a8cb537ab28 [INFO] running `Command { std: "docker" "start" "-a" "7876b960a3a2c123c27e920c50984f6b5bf6f3bf2711b5ff267e8a8cb537ab28", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7876b960a3a2c123c27e920c50984f6b5bf6f3bf2711b5ff267e8a8cb537ab28", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7876b960a3a2c123c27e920c50984f6b5bf6f3bf2711b5ff267e8a8cb537ab28", kill_on_drop: false }` [INFO] [stdout] 7876b960a3a2c123c27e920c50984f6b5bf6f3bf2711b5ff267e8a8cb537ab28 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] c542dc574053d1b7c4f33affff483f361499dcccf91e303e9771733f67c32302 [INFO] running `Command { std: "docker" "start" "-a" "c542dc574053d1b7c4f33affff483f361499dcccf91e303e9771733f67c32302", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Checking pom v1.1.0 [INFO] [stderr] Checking smb3k v0.0.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/parser.rs:172:19 [INFO] [stdout] | [INFO] [stdout] 172 | let integer = one_of(b"123456789") - one_of(b"0123456789").repeat(0..) | sym(b'0'); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(one_of(b"123456789") - one_of(b"0123456789").repeat(0..)) | sym(b'0')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/parser.rs:225:13 [INFO] [stdout] | [INFO] [stdout] 225 | kind: kind, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `kind` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/parser.rs:172:19 [INFO] [stdout] | [INFO] [stdout] 172 | let integer = one_of(b"123456789") - one_of(b"0123456789").repeat(0..) | sym(b'0'); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(one_of(b"123456789") - one_of(b"0123456789").repeat(0..)) | sym(b'0')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/parser.rs:225:13 [INFO] [stdout] | [INFO] [stdout] 225 | kind: kind, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `kind` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `type_name` is never read [INFO] [stdout] --> src/ast.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct FunctionParam { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] 24 | pub name: String, [INFO] [stdout] 25 | pub type_name: String, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FunctionParam` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `access_level` is never read [INFO] [stdout] --> src/ast.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 37 | pub struct TypeDeclaration { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 38 | pub access_level: AccessLevel, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TypeDeclaration` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `type_name` is never read [INFO] [stdout] --> src/ast.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 64 | Constant { [INFO] [stdout] | -------- field in this variant [INFO] [stdout] ... [INFO] [stdout] 67 | type_name: String, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TopLevelBlock` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `type_name` is never read [INFO] [stdout] --> src/ast.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct FunctionParam { [INFO] [stdout] | ------------- field in this struct [INFO] [stdout] 24 | pub name: String, [INFO] [stdout] 25 | pub type_name: String, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FunctionParam` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `access_level` is never read [INFO] [stdout] --> src/ast.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 37 | pub struct TypeDeclaration { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 38 | pub access_level: AccessLevel, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TypeDeclaration` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `type_name` is never read [INFO] [stdout] --> src/ast.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 64 | Constant { [INFO] [stdout] | -------- field in this variant [INFO] [stdout] ... [INFO] [stdout] 67 | type_name: String, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TopLevelBlock` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | result.push_str("}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('}')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` 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/js_writer.rs:74:22 [INFO] [stdout] | [INFO] [stdout] 74 | fn join_lines(lines: &Vec) -> String { [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] 74 - fn join_lines(lines: &Vec) -> String { [INFO] [stdout] 74 + fn join_lines(lines: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/js_writer.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | if ret.chars().next().unwrap() == '.' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `ret.starts_with('.')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_next_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | result.push_str("}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('}')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` 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/js_writer.rs:74:22 [INFO] [stdout] | [INFO] [stdout] 74 | fn join_lines(lines: &Vec) -> String { [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] 74 - fn join_lines(lines: &Vec) -> String { [INFO] [stdout] 74 + fn join_lines(lines: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/js_writer.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | if ret.chars().next().unwrap() == '.' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `ret.starts_with('.')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_next_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | result.push_str("("); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('(')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | result.push_str("("); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('(')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | result.push_str(","); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push(',')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | result.push_str(","); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push(',')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | result.push_str(";"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push(';')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | result.push_str(";"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push(';')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | result.push_str("("); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('(')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:170:17 [INFO] [stdout] | [INFO] [stdout] 170 | result.push_str(","); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push(',')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/js_writer.rs:172:16 [INFO] [stdout] | [INFO] [stdout] 172 | if args.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | result.push_str("("); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('(')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:188:13 [INFO] [stdout] | [INFO] [stdout] 188 | result.push_str("}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('}')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:170:17 [INFO] [stdout] | [INFO] [stdout] 170 | result.push_str(","); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push(',')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/js_writer.rs:172:16 [INFO] [stdout] | [INFO] [stdout] 172 | if args.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:206:13 [INFO] [stdout] | [INFO] [stdout] 206 | result.push_str(";"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push(';')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:188:13 [INFO] [stdout] | [INFO] [stdout] 188 | result.push_str("}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('}')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:206:13 [INFO] [stdout] | [INFO] [stdout] 206 | result.push_str(";"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push(';')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/js_writer.rs:220:16 [INFO] [stdout] | [INFO] [stdout] 220 | if step.chars().next().unwrap() == '-' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `step.starts_with('-')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:239:41 [INFO] [stdout] | [INFO] [stdout] 239 | DoLoopKind::None => result.push_str("}"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('}')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/js_writer.rs:220:16 [INFO] [stdout] | [INFO] [stdout] 220 | if step.chars().next().unwrap() == '-' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `step.starts_with('-')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:239:41 [INFO] [stdout] | [INFO] [stdout] 239 | DoLoopKind::None => result.push_str("}"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('}')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:267:13 [INFO] [stdout] | [INFO] [stdout] 267 | result.push_str(":"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push(':')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:280:13 [INFO] [stdout] | [INFO] [stdout] 280 | result.push_str("}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('}')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:311:9 [INFO] [stdout] | [INFO] [stdout] 311 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:267:13 [INFO] [stdout] | [INFO] [stdout] 267 | result.push_str(":"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push(':')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:344:5 [INFO] [stdout] | [INFO] [stdout] 344 | result.push_str("("); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('(')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/js_writer.rs:346:8 [INFO] [stdout] | [INFO] [stdout] 346 | if params.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!params.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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:280:13 [INFO] [stdout] | [INFO] [stdout] 280 | result.push_str("}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('}')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/js_writer.rs:356:9 [INFO] [stdout] | [INFO] [stdout] 356 | / match &p.default_value { [INFO] [stdout] 357 | | Some(v) => { [INFO] [stdout] 358 | | result.push_str( [INFO] [stdout] 359 | | format!("if (typeof {0} === 'undefined') {0} = {1};\n", p.name, v).as_str(), [INFO] [stdout] ... | [INFO] [stdout] 362 | | None => {} [INFO] [stdout] 363 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 356 ~ if let Some(v) = &p.default_value { [INFO] [stdout] 357 + result.push_str( [INFO] [stdout] 358 + format!("if (typeof {0} === 'undefined') {0} = {1};\n", p.name, v).as_str(), [INFO] [stdout] 359 + ); [INFO] [stdout] 360 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:311:9 [INFO] [stdout] | [INFO] [stdout] 311 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:376:5 [INFO] [stdout] | [INFO] [stdout] 376 | result.push_str("}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('}')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:344:5 [INFO] [stdout] | [INFO] [stdout] 344 | result.push_str("("); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('(')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/js_writer.rs:346:8 [INFO] [stdout] | [INFO] [stdout] 346 | if params.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!params.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/js_writer.rs:407:48 [INFO] [stdout] | [INFO] [stdout] 407 | post_header.push(write_let(&declaration, type_lookup)); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `declaration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/js_writer.rs:356:9 [INFO] [stdout] | [INFO] [stdout] 356 | / match &p.default_value { [INFO] [stdout] 357 | | Some(v) => { [INFO] [stdout] 358 | | result.push_str( [INFO] [stdout] 359 | | format!("if (typeof {0} === 'undefined') {0} = {1};\n", p.name, v).as_str(), [INFO] [stdout] ... | [INFO] [stdout] 362 | | None => {} [INFO] [stdout] 363 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 356 ~ if let Some(v) = &p.default_value { [INFO] [stdout] 357 + result.push_str( [INFO] [stdout] 358 + format!("if (typeof {0} === 'undefined') {0} = {1};\n", p.name, v).as_str(), [INFO] [stdout] 359 + ); [INFO] [stdout] 360 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/js_writer.rs:421:55 [INFO] [stdout] | [INFO] [stdout] 421 | ... pre_header.push(write_let(&declaration, type_lookup)); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `declaration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:376:5 [INFO] [stdout] | [INFO] [stdout] 376 | result.push_str("}"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('}')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/js_writer.rs:424:56 [INFO] [stdout] | [INFO] [stdout] 424 | ... post_header.push(write_let(&declaration, type_lookup)); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `declaration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/js_writer.rs:407:48 [INFO] [stdout] | [INFO] [stdout] 407 | post_header.push(write_let(&declaration, type_lookup)); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `declaration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/js_writer.rs:469:24 [INFO] [stdout] | [INFO] [stdout] 469 | && params.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `params.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/js_writer.rs:421:55 [INFO] [stdout] | [INFO] [stdout] 421 | ... pre_header.push(write_let(&declaration, type_lookup)); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `declaration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/js_writer.rs:424:56 [INFO] [stdout] | [INFO] [stdout] 424 | ... post_header.push(write_let(&declaration, type_lookup)); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `declaration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/js_writer.rs:469:24 [INFO] [stdout] | [INFO] [stdout] 469 | && params.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `params.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: calls to `push` immediately after creation [INFO] [stdout] --> src/js_writer.rs:556:5 [INFO] [stdout] | [INFO] [stdout] 556 | / let mut result = Vec::new(); [INFO] [stdout] 557 | | [INFO] [stdout] 558 | | result.push(String::from("DoEvents")); [INFO] [stdout] 559 | | result.push(String::from("EndScene")); [INFO] [stdout] ... | [INFO] [stdout] 563 | | result.push(String::from("__fileLoader.cwdLoadWorldData")); [INFO] [stdout] 564 | | result.push(String::from("__fileLoader.LevelLoadFromFile")); [INFO] [stdout] | |________________________________________________________________^ help: consider using the `vec![]` macro: `let mut result = 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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:587:9 [INFO] [stdout] | [INFO] [stdout] 587 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:592:9 [INFO] [stdout] | [INFO] [stdout] 592 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EOF` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | EOF, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Eof` [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/parser.rs:16:16 [INFO] [stdout] | [INFO] [stdout] 16 | if x.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!x.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: calls to `push` immediately after creation [INFO] [stdout] --> src/js_writer.rs:556:5 [INFO] [stdout] | [INFO] [stdout] 556 | / let mut result = Vec::new(); [INFO] [stdout] 557 | | [INFO] [stdout] 558 | | result.push(String::from("DoEvents")); [INFO] [stdout] 559 | | result.push(String::from("EndScene")); [INFO] [stdout] ... | [INFO] [stdout] 563 | | result.push(String::from("__fileLoader.cwdLoadWorldData")); [INFO] [stdout] 564 | | result.push(String::from("__fileLoader.LevelLoadFromFile")); [INFO] [stdout] | |________________________________________________________________^ help: consider using the `vec![]` macro: `let mut result = 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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:587:9 [INFO] [stdout] | [INFO] [stdout] 587 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js_writer.rs:592:9 [INFO] [stdout] | [INFO] [stdout] 592 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EOF` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | EOF, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Eof` [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/parser.rs:16:16 [INFO] [stdout] | [INFO] [stdout] 16 | if x.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!x.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/parser.rs:92:28 [INFO] [stdout] | [INFO] [stdout] 92 | fn is_module_class(blocks: &Vec) -> bool { [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] 92 - fn is_module_class(blocks: &Vec) -> bool { [INFO] [stdout] 92 + fn is_module_class(blocks: &[TopLevelBlock]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/parser.rs:95:23 [INFO] [stdout] | [INFO] [stdout] 95 | .find(|ref x| match x { [INFO] [stdout] | _______________________^ [INFO] [stdout] 96 | | TopLevelBlock::ClassMarker => true, [INFO] [stdout] 97 | | _ => false, [INFO] [stdout] 98 | | }) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 95 - .find(|ref x| match x { [INFO] [stdout] 96 - TopLevelBlock::ClassMarker => true, [INFO] [stdout] 97 - _ => false, [INFO] [stdout] 98 - }) [INFO] [stdout] 95 + .find(|ref x| matches!(x, TopLevelBlock::ClassMarker)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser.rs:109:17 [INFO] [stdout] | [INFO] [stdout] 109 | / if name == "VB_Name" { [INFO] [stdout] 110 | | return value.clone(); [INFO] [stdout] 111 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 108 ~ } [INFO] [stdout] 109 ~ if name == "VB_Name" => { [INFO] [stdout] 110 | return value.clone(); [INFO] [stdout] 111 ~ } [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/parser.rs:92:28 [INFO] [stdout] | [INFO] [stdout] 92 | fn is_module_class(blocks: &Vec) -> bool { [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] 92 - fn is_module_class(blocks: &Vec) -> bool { [INFO] [stdout] 92 + fn is_module_class(blocks: &[TopLevelBlock]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/parser.rs:95:23 [INFO] [stdout] | [INFO] [stdout] 95 | .find(|ref x| match x { [INFO] [stdout] | _______________________^ [INFO] [stdout] 96 | | TopLevelBlock::ClassMarker => true, [INFO] [stdout] 97 | | _ => false, [INFO] [stdout] 98 | | }) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 95 - .find(|ref x| match x { [INFO] [stdout] 96 - TopLevelBlock::ClassMarker => true, [INFO] [stdout] 97 - _ => false, [INFO] [stdout] 98 - }) [INFO] [stdout] 95 + .find(|ref x| matches!(x, TopLevelBlock::ClassMarker)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser.rs:109:17 [INFO] [stdout] | [INFO] [stdout] 109 | / if name == "VB_Name" { [INFO] [stdout] 110 | | return value.clone(); [INFO] [stdout] 111 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 108 ~ } [INFO] [stdout] 109 ~ if name == "VB_Name" => { [INFO] [stdout] 110 | return value.clone(); [INFO] [stdout] 111 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/parser.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | / match item { [INFO] [stdout] 105 | | &TopLevelBlock::Attribute { [INFO] [stdout] 106 | | ref name, [INFO] [stdout] 107 | | ref value, [INFO] [stdout] ... | [INFO] [stdout] 113 | | _ => {} [INFO] [stdout] 114 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 104 ~ if let &TopLevelBlock::Attribute { [INFO] [stdout] 105 + ref name, [INFO] [stdout] 106 + ref value, [INFO] [stdout] 107 + } = item { [INFO] [stdout] 108 + if name == "VB_Name" { [INFO] [stdout] 109 + return value.clone(); [INFO] [stdout] 110 + } [INFO] [stdout] 111 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a struct pattern where every field's pattern takes a reference [INFO] [stdout] --> src/parser.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 105 | / &TopLevelBlock::Attribute { [INFO] [stdout] 106 | | ref name, [INFO] [stdout] 107 | | ref value, [INFO] [stdout] 108 | | } => { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 105 ~ TopLevelBlock::Attribute { [INFO] [stdout] 106 ~ name, [INFO] [stdout] 107 ~ value, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/parser.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | / match item { [INFO] [stdout] 105 | | &TopLevelBlock::Attribute { [INFO] [stdout] 106 | | ref name, [INFO] [stdout] 107 | | ref value, [INFO] [stdout] ... | [INFO] [stdout] 113 | | _ => {} [INFO] [stdout] 114 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 104 ~ if let &TopLevelBlock::Attribute { [INFO] [stdout] 105 + ref name, [INFO] [stdout] 106 + ref value, [INFO] [stdout] 107 + } = item { [INFO] [stdout] 108 + if name == "VB_Name" { [INFO] [stdout] 109 + return value.clone(); [INFO] [stdout] 110 + } [INFO] [stdout] 111 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a struct pattern where every field's pattern takes a reference [INFO] [stdout] --> src/parser.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 105 | / &TopLevelBlock::Attribute { [INFO] [stdout] 106 | | ref name, [INFO] [stdout] 107 | | ref value, [INFO] [stdout] 108 | | } => { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 105 ~ TopLevelBlock::Attribute { [INFO] [stdout] 106 ~ name, [INFO] [stdout] 107 ~ value, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:393:46 [INFO] [stdout] | [INFO] [stdout] 393 | (seq(b"Dim") * space() * var_decl()).map(|v| StatementLine::Dim(v)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `StatementLine::Dim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` 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/parser.rs:421:28 [INFO] [stdout] | [INFO] [stdout] 421 | fn join(with: &str, lines: &Vec) -> String { [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] 421 - fn join(with: &str, lines: &Vec) -> String { [INFO] [stdout] 421 + fn join(with: &str, lines: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/parser.rs:393:46 [INFO] [stdout] | [INFO] [stdout] 393 | (seq(b"Dim") * space() * var_decl()).map(|v| StatementLine::Dim(v)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `StatementLine::Dim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` 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/parser.rs:421:28 [INFO] [stdout] | [INFO] [stdout] 421 | fn join(with: &str, lines: &Vec) -> String { [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] 421 - fn join(with: &str, lines: &Vec) -> String { [INFO] [stdout] 421 + fn join(with: &str, lines: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:503:21 [INFO] [stdout] | [INFO] [stdout] 503 | is_end: end && true, [INFO] [stdout] | ^^^^^^^^^^^ help: try: `end` [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:503:21 [INFO] [stdout] | [INFO] [stdout] 503 | is_end: end && true, [INFO] [stdout] | ^^^^^^^^^^^ help: try: `end` [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: length comparison to one [INFO] [stdout] --> src/parser.rs:568:24 [INFO] [stdout] | [INFO] [stdout] 568 | if x.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.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: redundant closure [INFO] [stdout] --> src/parser.rs:596:28 [INFO] [stdout] | [INFO] [stdout] 596 | rest_of_the_line().map(|x| StatementLine::Unknown(x)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `StatementLine::Unknown` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/parser.rs:568:24 [INFO] [stdout] | [INFO] [stdout] 568 | if x.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.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: redundant closure [INFO] [stdout] --> src/parser.rs:596:28 [INFO] [stdout] | [INFO] [stdout] 596 | rest_of_the_line().map(|x| StatementLine::Unknown(x)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `StatementLine::Unknown` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/js_writer.rs:541:27 [INFO] [stdout] | [INFO] [stdout] 541 | fn collect_types(program: &Vec) -> TypeLookup { [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 541 | fn collect_types(program: &Vec) -> TypeLookup<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/js_writer.rs:541:27 [INFO] [stdout] | [INFO] [stdout] 541 | fn collect_types(program: &Vec) -> TypeLookup { [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 541 | fn collect_types(program: &Vec) -> TypeLookup<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.65s [INFO] running `Command { std: "docker" "inspect" "c542dc574053d1b7c4f33affff483f361499dcccf91e303e9771733f67c32302", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c542dc574053d1b7c4f33affff483f361499dcccf91e303e9771733f67c32302", kill_on_drop: false }` [INFO] [stdout] c542dc574053d1b7c4f33affff483f361499dcccf91e303e9771733f67c32302