[INFO] fetching crate structom-codegen 0.1.8... [INFO] linting structom-codegen-0.1.8 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate structom-codegen 0.1.8 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate structom-codegen 0.1.8 [INFO] finished tweaking crates.io crate structom-codegen 0.1.8 [INFO] tweaked toml for crates.io crate structom-codegen 0.1.8 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate structom-codegen 0.1.8 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 crates.io crate structom-codegen 0.1.8 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] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded structom v0.2.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 399fb94ec45d3208284c571e926ab04c191f497150b5d22727a92f6255d9803f [INFO] running `Command { std: "docker" "start" "-a" "399fb94ec45d3208284c571e926ab04c191f497150b5d22727a92f6255d9803f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "399fb94ec45d3208284c571e926ab04c191f497150b5d22727a92f6255d9803f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "399fb94ec45d3208284c571e926ab04c191f497150b5d22727a92f6255d9803f", kill_on_drop: false }` [INFO] [stdout] 399fb94ec45d3208284c571e926ab04c191f497150b5d22727a92f6255d9803f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 64a98cfdacdad1b2302287c68564679b910ad30d6eb6c1674842f9ec53172a48 [INFO] running `Command { std: "docker" "start" "-a" "64a98cfdacdad1b2302287c68564679b910ad30d6eb6c1674842f9ec53172a48", kill_on_drop: false }` [INFO] [stderr] Checking anstyle v1.0.11 [INFO] [stderr] Checking anstyle-query v1.1.4 [INFO] [stderr] Checking clap_lex v0.7.5 [INFO] [stderr] Checking elsa v1.11.2 [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Checking chrono v0.4.43 [INFO] [stderr] Checking anstream v0.6.20 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Checking clap_builder v4.5.54 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Checking structom v0.2.2 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Checking clap v4.5.54 [INFO] [stderr] Checking structom-codegen v0.1.8 (/opt/rustwide/workdir) [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/js/encoding.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | for (_, item) in &file.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 13 - for (_, item) in &file.items { [INFO] [stdout] 13 + for item in file.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:14:3 [INFO] [stdout] | [INFO] [stdout] 14 | write!(source, "export function encode_{0}(value: {0}) {{\n", item.name()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 14 - write!(source, "export function encode_{0}(value: {0}) {{\n", item.name()).unwrap(); [INFO] [stdout] 14 + writeln!(source, "export function encode_{0}(value: {0}) {{", item.name()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:20:3 [INFO] [stdout] | [INFO] [stdout] 20 | write!(source, "\tencode_int_{}(buf, value);\n", item.name()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 20 - write!(source, "\tencode_int_{}(buf, value);\n", item.name()).unwrap(); [INFO] [stdout] 20 + writeln!(source, "\tencode_int_{}(buf, value);", item.name()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | write!(source, "export function encode_int_{name}(buf: Buffer, value: {name}) {{\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 27 - write!(source, "export function encode_int_{name}(buf: Buffer, value: {name}) {{\n") [INFO] [stdout] 27 + writeln!(source, "export function encode_int_{name}(buf: Buffer, value: {name}) {{") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | write!(source, ": {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 33 - write!(source, ": {name} {{\n").unwrap(); [INFO] [stdout] 33 + writeln!(source, ": {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | write!(source, "let value = {{}} as any as {name};\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 34 - write!(source, "let value = {{}} as any as {name};\n").unwrap(); [INFO] [stdout] 34 + writeln!(source, "let value = {{}} as any as {name};").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:50:2 [INFO] [stdout] | [INFO] [stdout] 50 | write!(source, "export function encode_int_{name}(buf: Buffer, value: {name}) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 50 - write!(source, "export function encode_int_{name}(buf: Buffer, value: {name}) {{\n").unwrap(); [INFO] [stdout] 50 + writeln!(source, "export function encode_int_{name}(buf: Buffer, value: {name}) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | write!(source, "\t\t\tenc.encode_vuint(buf, {tag});\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 56 - write!(source, "\t\t\tenc.encode_vuint(buf, {tag});\n",).unwrap(); [INFO] [stdout] 56 + writeln!(source, "\t\t\tenc.encode_vuint(buf, {tag});",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | write!(source, "\t\t\treturn encode_{name}_{var_name}(buf, value);\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 57 - write!(source, "\t\t\treturn encode_{name}_{var_name}(buf, value);\n",).unwrap(); [INFO] [stdout] 57 + writeln!(source, "\t\t\treturn encode_{name}_{var_name}(buf, value);",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:71:3 [INFO] [stdout] | [INFO] [stdout] 71 | write!(source, "value: {name} & {{ type: '{var_name}' }}) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 71 - write!(source, "value: {name} & {{ type: '{var_name}' }}) {{\n").unwrap(); [INFO] [stdout] 71 + writeln!(source, "value: {name} & {{ type: '{var_name}' }}) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:84:3 [INFO] [stdout] | [INFO] [stdout] 84 | write!(source, "\tenc.encode_vuint(buf, {});\n", req_fields.len()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 84 - write!(source, "\tenc.encode_vuint(buf, {});\n", req_fields.len()).unwrap(); [INFO] [stdout] 84 + writeln!(source, "\tenc.encode_vuint(buf, {});", req_fields.len()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:86:3 [INFO] [stdout] | [INFO] [stdout] 86 | write!(source, "\tenc.encode_vuint(buf, {}\n", req_fields.len()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 86 - write!(source, "\tenc.encode_vuint(buf, {}\n", req_fields.len()).unwrap(); [INFO] [stdout] 86 + writeln!(source, "\tenc.encode_vuint(buf, {}", req_fields.len()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | write!(source, "\t\t+ ('{}' in value ? 1 : 0)\n", field.name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 88 - write!(source, "\t\t+ ('{}' in value ? 1 : 0)\n", field.name).unwrap(); [INFO] [stdout] 88 + writeln!(source, "\t\t+ ('{}' in value ? 1 : 0)", field.name).unwrap(); [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/encoding.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | encode_field(source, &field, ctx); [INFO] [stdout] | ^^^^^^ help: change this to: `field` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:98:3 [INFO] [stdout] | [INFO] [stdout] 98 | write!(source, "\tif ('{}' in value) {{\n", field.name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 98 - write!(source, "\tif ('{}' in value) {{\n", field.name).unwrap(); [INFO] [stdout] 98 + writeln!(source, "\tif ('{}' in value) {{", field.name).unwrap(); [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/encoding.rs:99:24 [INFO] [stdout] | [INFO] [stdout] 99 | encode_field(source, &field, ctx); [INFO] [stdout] | ^^^^^^ help: change this to: `field` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:106:2 [INFO] [stdout] | [INFO] [stdout] 106 | write!(source, "\tenc.encode_vuint(buf, {});\n", tag << 3 | size).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 106 - write!(source, "\tenc.encode_vuint(buf, {});\n", tag << 3 | size).unwrap(); [INFO] [stdout] 106 + writeln!(source, "\tenc.encode_vuint(buf, {});", tag << 3 | size).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:107:2 [INFO] [stdout] | [INFO] [stdout] 107 | write!(source, "\tenc.encode_{ty}(buf, value.{name});\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 107 - write!(source, "\tenc.encode_{ty}(buf, value.{name});\n").unwrap(); [INFO] [stdout] 107 + writeln!(source, "\tenc.encode_{ty}(buf, value.{name});").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:111:2 [INFO] [stdout] | [INFO] [stdout] 111 | write!(source, "\tenc.encode_vuint(buf, {});\n", tag << 3 | 0b101).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 111 - write!(source, "\tenc.encode_vuint(buf, {});\n", tag << 3 | 0b101).unwrap(); [INFO] [stdout] 111 + writeln!(source, "\tenc.encode_vuint(buf, {});", tag << 3 | 0b101).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:112:2 [INFO] [stdout] | [INFO] [stdout] 112 | write!(source, "\tenc.encode_vuint(buf, {size});\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 112 - write!(source, "\tenc.encode_vuint(buf, {size});\n").unwrap(); [INFO] [stdout] 112 + writeln!(source, "\tenc.encode_vuint(buf, {size});").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:113:2 [INFO] [stdout] | [INFO] [stdout] 113 | write!(source, "\tenc.encode_{ty}(buf, value.{name});\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 113 - write!(source, "\tenc.encode_{ty}(buf, value.{name});\n").unwrap(); [INFO] [stdout] 113 + writeln!(source, "\tenc.encode_{ty}(buf, value.{name});").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:117:2 [INFO] [stdout] | [INFO] [stdout] 117 | write!(source, "\tenc.encode_vuint(buf, {});\n", tag << 3 | 0b101).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 117 - write!(source, "\tenc.encode_vuint(buf, {});\n", tag << 3 | 0b101).unwrap(); [INFO] [stdout] 117 + writeln!(source, "\tenc.encode_vuint(buf, {});", tag << 3 | 0b101).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:119:2 [INFO] [stdout] | [INFO] [stdout] 119 | write!(source, "\tlet size_ind_{size_ind_inst} = buf.pos;\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 119 - write!(source, "\tlet size_ind_{size_ind_inst} = buf.pos;\n").unwrap(); [INFO] [stdout] 119 + writeln!(source, "\tlet size_ind_{size_ind_inst} = buf.pos;").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:124:2 [INFO] [stdout] | [INFO] [stdout] 124 | write!(source, "{size_ind_inst} - 2, size_ind_{size_ind_inst}, 2);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 124 - write!(source, "{size_ind_inst} - 2, size_ind_{size_ind_inst}, 2);\n").unwrap(); [INFO] [stdout] 124 + writeln!(source, "{size_ind_inst} - 2, size_ind_{size_ind_inst}, 2);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js/encoding.rs:166:5 [INFO] [stdout] | [INFO] [stdout] 166 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js/encoding.rs:173:5 [INFO] [stdout] | [INFO] [stdout] 173 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:260:2 [INFO] [stdout] | [INFO] [stdout] 260 | write!(source, "export function decode_{name}(buf: Buffer, cur: Cursor): {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 260 - write!(source, "export function decode_{name}(buf: Buffer, cur: Cursor): {name} {{\n").unwrap(); [INFO] [stdout] 260 + writeln!(source, "export function decode_{name}(buf: Buffer, cur: Cursor): {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:262:2 [INFO] [stdout] | [INFO] [stdout] 262 | write!(source, "\tswitch (enc.decode_vuint(buf, cur) as number) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 262 - write!(source, "\tswitch (enc.decode_vuint(buf, cur) as number) {{\n").unwrap(); [INFO] [stdout] 262 + writeln!(source, "\tswitch (enc.decode_vuint(buf, cur) as number) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:265:4 [INFO] [stdout] | [INFO] [stdout] 265 | write!(source, "\t\tcase {tag}: return decode_{name}_{var_name}(buf, cur);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 265 - write!(source, "\t\tcase {tag}: return decode_{name}_{var_name}(buf, cur);\n").unwrap(); [INFO] [stdout] 265 + writeln!(source, "\t\tcase {tag}: return decode_{name}_{var_name}(buf, cur);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:267:4 [INFO] [stdout] | [INFO] [stdout] 267 | write!(source, "\t\tcase {tag}: return {{ type: '{var_name}' }};\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 267 - write!(source, "\t\tcase {tag}: return {{ type: '{var_name}' }};\n").unwrap(); [INFO] [stdout] 267 + writeln!(source, "\t\tcase {tag}: return {{ type: '{var_name}' }};").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:275:3 [INFO] [stdout] | [INFO] [stdout] 275 | write!(source, "export function decode_{name}_{var_name}(buf: Buffer, cur: Cursor) {{\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 275 - write!(source, "export function decode_{name}_{var_name}(buf: Buffer, cur: Cursor) {{\n") [INFO] [stdout] 275 + writeln!(source, "export function decode_{name}_{var_name}(buf: Buffer, cur: Cursor) {{") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:278:3 [INFO] [stdout] | [INFO] [stdout] 278 | write!(source, "as {name} & {{ type: '{var_name}' }};\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 278 - write!(source, "as {name} & {{ type: '{var_name}' }};\n").unwrap(); [INFO] [stdout] 278 + writeln!(source, "as {name} & {{ type: '{var_name}' }};").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:295:4 [INFO] [stdout] | [INFO] [stdout] 295 | write!(source, "\t\tif (tag === {tag}) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 295 - write!(source, "\t\tif (tag === {tag}) {{\n").unwrap(); [INFO] [stdout] 295 + writeln!(source, "\t\tif (tag === {tag}) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:297:4 [INFO] [stdout] | [INFO] [stdout] 297 | write!(source, " else if (tag === {tag}) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 297 - write!(source, " else if (tag === {tag}) {{\n").unwrap(); [INFO] [stdout] 297 + writeln!(source, " else if (tag === {tag}) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:311:2 [INFO] [stdout] | [INFO] [stdout] 311 | write!(source, "\t\t\tvalue.{name} = enc.decode_{ty}(buf, cur);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 311 - write!(source, "\t\t\tvalue.{name} = enc.decode_{ty}(buf, cur);\n").unwrap(); [INFO] [stdout] 311 + writeln!(source, "\t\t\tvalue.{name} = enc.decode_{ty}(buf, cur);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:315:2 [INFO] [stdout] | [INFO] [stdout] 315 | write!(source, "\t\t\tvalue.{name} = enc.decode_{ty}(buf, cur);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 315 - write!(source, "\t\t\tvalue.{name} = enc.decode_{ty}(buf, cur);\n").unwrap(); [INFO] [stdout] 315 + writeln!(source, "\t\t\tvalue.{name} = enc.decode_{ty}(buf, cur);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js/encoding.rs:354:5 [INFO] [stdout] | [INFO] [stdout] 354 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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/encoding.rs:361:5 [INFO] [stdout] | [INFO] [stdout] 361 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:425:4 [INFO] [stdout] | [INFO] [stdout] 425 | write!(source, "\t\t\tvalue.{name} = decode_{type_name}(buf, cur);\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 425 - write!(source, "\t\t\tvalue.{name} = decode_{type_name}(buf, cur);\n",).unwrap(); [INFO] [stdout] 425 + writeln!(source, "\t\t\tvalue.{name} = decode_{type_name}(buf, cur);",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:432:4 [INFO] [stdout] | [INFO] [stdout] 432 | write!(source, ".decode_{type_name}(buf, cur);\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 432 - write!(source, ".decode_{type_name}(buf, cur);\n",).unwrap(); [INFO] [stdout] 432 + writeln!(source, ".decode_{type_name}(buf, cur);",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/root.rs:7:2 [INFO] [stdout] | [INFO] [stdout] 7 | write!(source, "// generated from {in_dir}\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 7 - write!(source, "// generated from {in_dir}\n").unwrap(); [INFO] [stdout] 7 + writeln!(source, "// generated from {in_dir}").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/root.rs:11:3 [INFO] [stdout] | [INFO] [stdout] 11 | write!(source, "import * as ns_{resolved_path} from \"./{resolved_path}.ts\";\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 11 - write!(source, "import * as ns_{resolved_path} from \"./{resolved_path}.ts\";\n").unwrap(); [INFO] [stdout] 11 + writeln!(source, "import * as ns_{resolved_path} from \"./{resolved_path}.ts\";").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/root.rs:23:3 [INFO] [stdout] | [INFO] [stdout] 23 | write!(source, "\t\tcase '{rel_path}': {{ switch (enc.decode_vuint(buf, cur)) {{\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 23 - write!(source, "\t\tcase '{rel_path}': {{ switch (enc.decode_vuint(buf, cur)) {{\n") [INFO] [stdout] 23 + writeln!(source, "\t\tcase '{rel_path}': {{ switch (enc.decode_vuint(buf, cur)) {{") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/js/root.rs:25:20 [INFO] [stdout] | [INFO] [stdout] 25 | for (_, item) in &decl.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 25 - for (_, item) in &decl.items { [INFO] [stdout] 25 + for item in decl.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/root.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | write!(source, ".decode_{}(buf, cur) as any;\n", item.name()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 27 - write!(source, ".decode_{}(buf, cur) as any;\n", item.name()).unwrap(); [INFO] [stdout] 27 + writeln!(source, ".decode_{}(buf, cur) as any;", item.name()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/js/type_def.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 9 | for (_, item) in &file.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 9 - for (_, item) in &file.items { [INFO] [stdout] 9 + for item in file.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/type_def.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | write!(source, "export interface {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 12 - write!(source, "export interface {name} {{\n").unwrap(); [INFO] [stdout] 12 + writeln!(source, "export interface {name} {{").unwrap(); [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/type_def.rs:55:22 [INFO] [stdout] | [INFO] [stdout] 55 | write_type(source, &typeid, used_files, ctx).unwrap(); [INFO] [stdout] | ^^^^^^^ help: change this to: `typeid` [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: passing a unit value to a function [INFO] [stdout] --> src/js/type_def.rs:83:2 [INFO] [stdout] | [INFO] [stdout] 83 | / Some(if typeid.is_builtin() { [INFO] [stdout] 84 | | match typeid.id { [INFO] [stdout] 85 | | ARR_TYPEID => { [INFO] [stdout] 86 | | source.push_str("Array<"); [INFO] [stdout] ... | [INFO] [stdout] 114 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 83 ~ let _: () = if typeid.is_builtin() { [INFO] [stdout] 84 ~ match typeid.id { [INFO] [stdout] 85 ~ ARR_TYPEID => { [INFO] [stdout] 86 ~ source.push_str("Array<"); [INFO] [stdout] 87 ~ write_type(source, typeid.item(), used_files, ctx); [INFO] [stdout] 88 ~ source.push('>'); [INFO] [stdout] 89 ~ } [INFO] [stdout] 90 ~ MAP_TYPEID => { [INFO] [stdout] 91 ~ source.push_str("Map<"); [INFO] [stdout] 92 ~ source.push_str(resolve_built_in_type(typeid.variant)); [INFO] [stdout] 93 ~ source.push_str(", "); [INFO] [stdout] 94 ~ write_type(source, typeid.item(), used_files, ctx); [INFO] [stdout] 95 ~ source.push('>'); [INFO] [stdout] 96 ~ } [INFO] [stdout] 97 ~ id => source.push_str(resolve_built_in_type(id)), [INFO] [stdout] 98 ~ } [INFO] [stdout] 99 ~ // user-defined type [INFO] [stdout] 100 ~ } else { [INFO] [stdout] 101 ~ let Ctx { file, provider, path_map } = ctx; [INFO] [stdout] 102 ~ // same file [INFO] [stdout] 103 ~ if typeid.ns == file.id { [INFO] [stdout] 104 ~ source.push_str(file.get_by_id(typeid.id)?.name()); [INFO] [stdout] 105 ~ } else { [INFO] [stdout] 106 ~ // write ns.type_name [INFO] [stdout] 107 ~ used_files.insert(typeid.ns); [INFO] [stdout] 108 ~ let file = provider.get(typeid.ns); [INFO] [stdout] 109 ~ source.push_str("ns_"); [INFO] [stdout] 110 ~ source.push_str(path_map.get(&file.id)?); [INFO] [stdout] 111 ~ source.push('.'); [INFO] [stdout] 112 ~ source.push_str(file.get_by_id(typeid.id)?.name()); [INFO] [stdout] 113 ~ } [INFO] [stdout] 114 ~ }; [INFO] [stdout] 115 + Some(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | write!(source, "import * as ns_{path} from \"./{path}.ts\";\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 49 - write!(source, "import * as ns_{path} from \"./{path}.ts\";\n").unwrap(); [INFO] [stdout] 49 + writeln!(source, "import * as ns_{path} from \"./{path}.ts\";").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/rust/encoding.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | for (_, item) in &file.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 13 - for (_, item) in &file.items { [INFO] [stdout] 13 + for item in file.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | write!(source, "pub fn encode_{name}(data: &mut Vec, value: &{name}) {{\n",) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 16 - write!(source, "pub fn encode_{name}(data: &mut Vec, value: &{name}) {{\n",) [INFO] [stdout] 16 + writeln!(source, "pub fn encode_{name}(data: &mut Vec, value: &{name}) {{",) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | write!(source, " -> Option<{name}> {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 22 - write!(source, " -> Option<{name}> {{\n").unwrap(); [INFO] [stdout] 22 + writeln!(source, " -> Option<{name}> {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:38:2 [INFO] [stdout] | [INFO] [stdout] 38 | write!(source, "pub fn encode_{name}(data: &mut Vec, value: &{name}) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 38 - write!(source, "pub fn encode_{name}(data: &mut Vec, value: &{name}) {{\n").unwrap(); [INFO] [stdout] 38 + writeln!(source, "pub fn encode_{name}(data: &mut Vec, value: &{name}) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:45:4 [INFO] [stdout] | [INFO] [stdout] 45 | write!(source, "\t\t\tencode_vuint(data, {tag});\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 45 - write!(source, "\t\t\tencode_vuint(data, {tag});\n",).unwrap(); [INFO] [stdout] 45 + writeln!(source, "\t\t\tencode_vuint(data, {tag});",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:46:4 [INFO] [stdout] | [INFO] [stdout] 46 | write!(source, "\t\t\tencode_{name}_{var_name}(data, value);\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 46 - write!(source, "\t\t\tencode_{name}_{var_name}(data, value);\n",).unwrap(); [INFO] [stdout] 46 + writeln!(source, "\t\t\tencode_{name}_{var_name}(data, value);",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:58:3 [INFO] [stdout] | [INFO] [stdout] 58 | write!(source, "value: &{name}) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 58 - write!(source, "value: &{name}) {{\n").unwrap(); [INFO] [stdout] 58 + writeln!(source, "value: &{name}) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:78:3 [INFO] [stdout] | [INFO] [stdout] 78 | write!(source, "\tencode_vuint(data, {});\n", req_fields.len()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 78 - write!(source, "\tencode_vuint(data, {});\n", req_fields.len()).unwrap(); [INFO] [stdout] 78 + writeln!(source, "\tencode_vuint(data, {});", req_fields.len()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:80:3 [INFO] [stdout] | [INFO] [stdout] 80 | write!(source, "\tencode_vuint(data, {}\n", req_fields.len()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 80 - write!(source, "\tencode_vuint(data, {}\n", req_fields.len()).unwrap(); [INFO] [stdout] 80 + writeln!(source, "\tencode_vuint(data, {}", req_fields.len()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:82:4 [INFO] [stdout] | [INFO] [stdout] 82 | write!(source, "\t\t+ if f_{}.is_some() {{1}} else {{0}}\n", field.name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 82 - write!(source, "\t\t+ if f_{}.is_some() {{1}} else {{0}}\n", field.name).unwrap(); [INFO] [stdout] 82 + writeln!(source, "\t\t+ if f_{}.is_some() {{1}} else {{0}}", field.name).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rust/encoding.rs:88:24 [INFO] [stdout] | [INFO] [stdout] 88 | encode_field(source, &field, ctx); [INFO] [stdout] | ^^^^^^ help: change this to: `field` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:91:3 [INFO] [stdout] | [INFO] [stdout] 91 | write!(source, "\tif let Some(f_{0}) = f_{0} {{\n", field.name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 91 - write!(source, "\tif let Some(f_{0}) = f_{0} {{\n", field.name).unwrap(); [INFO] [stdout] 91 + writeln!(source, "\tif let Some(f_{0}) = f_{0} {{", field.name).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rust/encoding.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | encode_field(source, &field, ctx); [INFO] [stdout] | ^^^^^^ help: change this to: `field` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:99:2 [INFO] [stdout] | [INFO] [stdout] 99 | write!(source, "\tencode_vuint(data, {});\n", tag << 3 | size).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 99 - write!(source, "\tencode_vuint(data, {});\n", tag << 3 | size).unwrap(); [INFO] [stdout] 99 + writeln!(source, "\tencode_vuint(data, {});", tag << 3 | size).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:100:2 [INFO] [stdout] | [INFO] [stdout] 100 | write!(source, "\tencode_{ty}(data, {}f_{name});\n", if is_copy { "*" } else { "&" }).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 100 - write!(source, "\tencode_{ty}(data, {}f_{name});\n", if is_copy { "*" } else { "&" }).unwrap(); [INFO] [stdout] 100 + writeln!(source, "\tencode_{ty}(data, {}f_{name});", if is_copy { "*" } else { "&" }).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:104:2 [INFO] [stdout] | [INFO] [stdout] 104 | write!(source, "\tencode_vuint(data, {});\n", tag << 3 | field_len::LEN).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 104 - write!(source, "\tencode_vuint(data, {});\n", tag << 3 | field_len::LEN).unwrap(); [INFO] [stdout] 104 + writeln!(source, "\tencode_vuint(data, {});", tag << 3 | field_len::LEN).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:105:2 [INFO] [stdout] | [INFO] [stdout] 105 | write!(source, "\tencode_vuint(data, {size});\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 105 - write!(source, "\tencode_vuint(data, {size});\n").unwrap(); [INFO] [stdout] 105 + writeln!(source, "\tencode_vuint(data, {size});").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:106:2 [INFO] [stdout] | [INFO] [stdout] 106 | write!(source, "\tencode_{ty}(data, f_{name});\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 106 - write!(source, "\tencode_{ty}(data, f_{name});\n").unwrap(); [INFO] [stdout] 106 + writeln!(source, "\tencode_{ty}(data, f_{name});").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:109:2 [INFO] [stdout] | [INFO] [stdout] 109 | write!(source, "\tencode_vuint(data, {});\n", tag << 3 | 0b101).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 109 - write!(source, "\tencode_vuint(data, {});\n", tag << 3 | 0b101).unwrap(); [INFO] [stdout] 109 + writeln!(source, "\tencode_vuint(data, {});", tag << 3 | 0b101).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/rust/encoding.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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/rust/encoding.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:255:2 [INFO] [stdout] | [INFO] [stdout] 255 | write!(source, "pub fn decode_{name}(data: &[u8], ind: &mut usize) -> Option<{name}> {{\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 255 - write!(source, "pub fn decode_{name}(data: &[u8], ind: &mut usize) -> Option<{name}> {{\n") [INFO] [stdout] 255 + writeln!(source, "pub fn decode_{name}(data: &[u8], ind: &mut usize) -> Option<{name}> {{") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:258:2 [INFO] [stdout] | [INFO] [stdout] 258 | write!(source, "\tmatch decode_vuint(data, ind)? {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 258 - write!(source, "\tmatch decode_vuint(data, ind)? {{\n").unwrap(); [INFO] [stdout] 258 + writeln!(source, "\tmatch decode_vuint(data, ind)? {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:261:4 [INFO] [stdout] | [INFO] [stdout] 261 | write!(source, "\t\t{tag} => decode_{name}_{var_name}(data, ind),\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 261 - write!(source, "\t\t{tag} => decode_{name}_{var_name}(data, ind),\n").unwrap(); [INFO] [stdout] 261 + writeln!(source, "\t\t{tag} => decode_{name}_{var_name}(data, ind),").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:263:4 [INFO] [stdout] | [INFO] [stdout] 263 | write!(source, "\t\t{tag} => Some({name}::{var_name}),\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 263 - write!(source, "\t\t{tag} => Some({name}::{var_name}),\n").unwrap(); [INFO] [stdout] 263 + writeln!(source, "\t\t{tag} => Some({name}::{var_name}),").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:281:3 [INFO] [stdout] | [INFO] [stdout] 281 | write!(source, "\tlet mut f_{name} = None;\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 281 - write!(source, "\tlet mut f_{name} = None;\n").unwrap(); [INFO] [stdout] 281 + writeln!(source, "\tlet mut f_{name} = None;").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:291:4 [INFO] [stdout] | [INFO] [stdout] 291 | write!(source, "\t\tif tag == {tag} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 291 - write!(source, "\t\tif tag == {tag} {{\n").unwrap(); [INFO] [stdout] 291 + writeln!(source, "\t\tif tag == {tag} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:293:4 [INFO] [stdout] | [INFO] [stdout] 293 | write!(source, " else if tag == {tag} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 293 - write!(source, " else if tag == {tag} {{\n").unwrap(); [INFO] [stdout] 293 + writeln!(source, " else if tag == {tag} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:304:3 [INFO] [stdout] | [INFO] [stdout] 304 | write!(source, "\tlet Some(f_{name}) = f_{name} else {{ return None; }};\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 304 - write!(source, "\tlet Some(f_{name}) = f_{name} else {{ return None; }};\n").unwrap(); [INFO] [stdout] 304 + writeln!(source, "\tlet Some(f_{name}) = f_{name} else {{ return None; }};").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:306:2 [INFO] [stdout] | [INFO] [stdout] 306 | write!(source, "\tSome({name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 306 - write!(source, "\tSome({name} {{\n").unwrap(); [INFO] [stdout] 306 + writeln!(source, "\tSome({name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:309:4 [INFO] [stdout] | [INFO] [stdout] 309 | write!(source, "\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 309 - write!(source, "\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] 309 + writeln!(source, "\t\t{name}: f_{name}, ").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:317:2 [INFO] [stdout] | [INFO] [stdout] 317 | write!(source, "\t\t\tf_{name} = Some(decode_{ty}(data, ind)?);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 317 - write!(source, "\t\t\tf_{name} = Some(decode_{ty}(data, ind)?);\n").unwrap(); [INFO] [stdout] 317 + writeln!(source, "\t\t\tf_{name} = Some(decode_{ty}(data, ind)?);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:321:2 [INFO] [stdout] | [INFO] [stdout] 321 | write!(source, "\t\t\tf_{name} = Some(decode_{ty}(data, ind)?);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 321 - write!(source, "\t\t\tf_{name} = Some(decode_{ty}(data, ind)?);\n").unwrap(); [INFO] [stdout] 321 + writeln!(source, "\t\t\tf_{name} = Some(decode_{ty}(data, ind)?);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/rust/encoding.rs:362:5 [INFO] [stdout] | [INFO] [stdout] 362 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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/rust/encoding.rs:369:5 [INFO] [stdout] | [INFO] [stdout] 369 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:432:4 [INFO] [stdout] | [INFO] [stdout] 432 | write!(source, "\t\t\tf_{name} = Some(decode_{type_name}(data, ind)?);\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 432 - write!(source, "\t\t\tf_{name} = Some(decode_{type_name}(data, ind)?);\n",).unwrap(); [INFO] [stdout] 432 + writeln!(source, "\t\t\tf_{name} = Some(decode_{type_name}(data, ind)?);",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:439:4 [INFO] [stdout] | [INFO] [stdout] 439 | write!(source, "::decode_{type_name}(data, ind)?);\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 439 - write!(source, "::decode_{type_name}(data, ind)?);\n",).unwrap(); [INFO] [stdout] 439 + writeln!(source, "::decode_{type_name}(data, ind)?);",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/root.rs:7:2 [INFO] [stdout] | [INFO] [stdout] 7 | write!(source, "// generated from {in_dir}\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 7 - write!(source, "// generated from {in_dir}\n").unwrap(); [INFO] [stdout] 7 + writeln!(source, "// generated from {in_dir}").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/root.rs:13:3 [INFO] [stdout] | [INFO] [stdout] 13 | write!(source, "pub mod {resolved_path};\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 13 - write!(source, "pub mod {resolved_path};\n").unwrap(); [INFO] [stdout] 13 + writeln!(source, "pub mod {resolved_path};").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/root.rs:23:3 [INFO] [stdout] | [INFO] [stdout] 23 | write!(source, "\t\t{rel_path:?} => match decode_vuint(data, &mut ind)? {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 23 - write!(source, "\t\t{rel_path:?} => match decode_vuint(data, &mut ind)? {{\n").unwrap(); [INFO] [stdout] 23 + writeln!(source, "\t\t{rel_path:?} => match decode_vuint(data, &mut ind)? {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/rust/root.rs:25:20 [INFO] [stdout] | [INFO] [stdout] 25 | for (_, item) in &decl.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 25 - for (_, item) in &decl.items { [INFO] [stdout] 25 + for item in decl.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/root.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | write!(source, "::decode_{}(data, &mut ind)?),\n", item.name()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 27 - write!(source, "::decode_{}(data, &mut ind)?),\n", item.name()).unwrap(); [INFO] [stdout] 27 + writeln!(source, "::decode_{}(data, &mut ind)?),", item.name()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/rust/type_def.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | for (_, item) in &file.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 13 - for (_, item) in &file.items { [INFO] [stdout] 13 + for item in file.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/rust/type_def.rs:25:19 [INFO] [stdout] | [INFO] [stdout] 25 | for (_, item) in &file.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 25 - for (_, item) in &file.items { [INFO] [stdout] 25 + for item in file.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:43:2 [INFO] [stdout] | [INFO] [stdout] 43 | write!(source, "pub enum {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 43 - write!(source, "pub enum {name} {{\n").unwrap(); [INFO] [stdout] 43 + writeln!(source, "pub enum {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:63:2 [INFO] [stdout] | [INFO] [stdout] 63 | write!(source, "impl Default for {} {{\n", item.name()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 63 - write!(source, "impl Default for {} {{\n", item.name()).unwrap(); [INFO] [stdout] 63 + writeln!(source, "impl Default for {} {{", item.name()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/js/encoding.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | for (_, item) in &file.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 13 - for (_, item) in &file.items { [INFO] [stdout] 13 + for item in file.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:14:3 [INFO] [stdout] | [INFO] [stdout] 14 | write!(source, "export function encode_{0}(value: {0}) {{\n", item.name()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 14 - write!(source, "export function encode_{0}(value: {0}) {{\n", item.name()).unwrap(); [INFO] [stdout] 14 + writeln!(source, "export function encode_{0}(value: {0}) {{", item.name()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:20:3 [INFO] [stdout] | [INFO] [stdout] 20 | write!(source, "\tencode_int_{}(buf, value);\n", item.name()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 20 - write!(source, "\tencode_int_{}(buf, value);\n", item.name()).unwrap(); [INFO] [stdout] 20 + writeln!(source, "\tencode_int_{}(buf, value);", item.name()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | write!(source, "export function encode_int_{name}(buf: Buffer, value: {name}) {{\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 27 - write!(source, "export function encode_int_{name}(buf: Buffer, value: {name}) {{\n") [INFO] [stdout] 27 + writeln!(source, "export function encode_int_{name}(buf: Buffer, value: {name}) {{") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:168:2 [INFO] [stdout] | [INFO] [stdout] 168 | write!(source, "impl Serialized for {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 168 - write!(source, "impl Serialized for {name} {{\n").unwrap(); [INFO] [stdout] 168 + writeln!(source, "impl Serialized for {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:178:2 [INFO] [stdout] | [INFO] [stdout] 178 | write!(source, "\t\tencode_{name}(&mut data, self);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 178 - write!(source, "\t\tencode_{name}(&mut data, self);\n").unwrap(); [INFO] [stdout] 178 + writeln!(source, "\t\tencode_{name}(&mut data, self);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | write!(source, ": {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 33 - write!(source, ": {name} {{\n").unwrap(); [INFO] [stdout] 33 + writeln!(source, ": {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:184:2 [INFO] [stdout] | [INFO] [stdout] 184 | write!(source, "\t\tencode_{name}(data, self);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 184 - write!(source, "\t\tencode_{name}(data, self);\n").unwrap(); [INFO] [stdout] 184 + writeln!(source, "\t\tencode_{name}(data, self);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | write!(source, "let value = {{}} as any as {name};\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 34 - write!(source, "let value = {{}} as any as {name};\n").unwrap(); [INFO] [stdout] 34 + writeln!(source, "let value = {{}} as any as {name};").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:188:2 [INFO] [stdout] | [INFO] [stdout] 188 | write!(source, "\tfn decode(data: &[u8]) -> Option<{name}> {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 188 - write!(source, "\tfn decode(data: &[u8]) -> Option<{name}> {{\n").unwrap(); [INFO] [stdout] 188 + writeln!(source, "\tfn decode(data: &[u8]) -> Option<{name}> {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:191:2 [INFO] [stdout] | [INFO] [stdout] 191 | write!(source, "\t\tif decode_str(data, &mut ind)? != {file:?} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 191 - write!(source, "\t\tif decode_str(data, &mut ind)? != {file:?} {{\n").unwrap(); [INFO] [stdout] 191 + writeln!(source, "\t\tif decode_str(data, &mut ind)? != {file:?} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:50:2 [INFO] [stdout] | [INFO] [stdout] 50 | write!(source, "export function encode_int_{name}(buf: Buffer, value: {name}) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 50 - write!(source, "export function encode_int_{name}(buf: Buffer, value: {name}) {{\n").unwrap(); [INFO] [stdout] 50 + writeln!(source, "export function encode_int_{name}(buf: Buffer, value: {name}) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:194:2 [INFO] [stdout] | [INFO] [stdout] 194 | write!(source, "\t\tif decode_vuint(data, &mut ind)? != {} {{\n", item.typeid()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 194 - write!(source, "\t\tif decode_vuint(data, &mut ind)? != {} {{\n", item.typeid()).unwrap(); [INFO] [stdout] 194 + writeln!(source, "\t\tif decode_vuint(data, &mut ind)? != {} {{", item.typeid()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:197:2 [INFO] [stdout] | [INFO] [stdout] 197 | write!(source, "\t\tlet value = decode_{name}(data, &mut ind)?;\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 197 - write!(source, "\t\tlet value = decode_{name}(data, &mut ind)?;\n").unwrap(); [INFO] [stdout] 197 + writeln!(source, "\t\tlet value = decode_{name}(data, &mut ind)?;").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:203:2 [INFO] [stdout] | [INFO] [stdout] 203 | write!(source, "\tfn decode_headless(data: &[u8]) -> Option<{name}> {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 203 - write!(source, "\tfn decode_headless(data: &[u8]) -> Option<{name}> {{\n").unwrap(); [INFO] [stdout] 203 + writeln!(source, "\tfn decode_headless(data: &[u8]) -> Option<{name}> {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | write!(source, "\t\t\tenc.encode_vuint(buf, {tag});\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 56 - write!(source, "\t\t\tenc.encode_vuint(buf, {tag});\n",).unwrap(); [INFO] [stdout] 56 + writeln!(source, "\t\t\tenc.encode_vuint(buf, {tag});",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:205:2 [INFO] [stdout] | [INFO] [stdout] 205 | write!(source, "\t\tlet value = decode_{name}(data, &mut ind)?;\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 205 - write!(source, "\t\tlet value = decode_{name}(data, &mut ind)?;\n").unwrap(); [INFO] [stdout] 205 + writeln!(source, "\t\tlet value = decode_{name}(data, &mut ind)?;").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | write!(source, "\t\t\treturn encode_{name}_{var_name}(buf, value);\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 57 - write!(source, "\t\t\treturn encode_{name}_{var_name}(buf, value);\n",).unwrap(); [INFO] [stdout] 57 + writeln!(source, "\t\t\treturn encode_{name}_{var_name}(buf, value);",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:211:2 [INFO] [stdout] | [INFO] [stdout] 211 | write!(source, "\tfn decode_inline(data: &[u8], ind: &mut usize) -> Option<{name}> {{\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 211 - write!(source, "\tfn decode_inline(data: &[u8], ind: &mut usize) -> Option<{name}> {{\n") [INFO] [stdout] 211 + writeln!(source, "\tfn decode_inline(data: &[u8], ind: &mut usize) -> Option<{name}> {{") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:213:2 [INFO] [stdout] | [INFO] [stdout] 213 | write!(source, "\t\tdecode_{name}(data, ind)\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 213 - write!(source, "\t\tdecode_{name}(data, ind)\n").unwrap(); [INFO] [stdout] 213 + writeln!(source, "\t\tdecode_{name}(data, ind)").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/rust/value.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | for (_, item) in &file.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 10 - for (_, item) in &file.items { [INFO] [stdout] 10 + for item in file.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:71:3 [INFO] [stdout] | [INFO] [stdout] 71 | write!(source, "value: {name} & {{ type: '{var_name}' }}) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 71 - write!(source, "value: {name} & {{ type: '{var_name}' }}) {{\n").unwrap(); [INFO] [stdout] 71 + writeln!(source, "value: {name} & {{ type: '{var_name}' }}) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:29:2 [INFO] [stdout] | [INFO] [stdout] 29 | write!(source, "impl TryFrom for {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 29 - write!(source, "impl TryFrom for {name} {{\n").unwrap(); [INFO] [stdout] 29 + writeln!(source, "impl TryFrom for {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:31:2 [INFO] [stdout] | [INFO] [stdout] 31 | write!(source, "\tfn try_from(value: Value) -> Result<{name}, ()> {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 31 - write!(source, "\tfn try_from(value: Value) -> Result<{name}, ()> {{\n").unwrap(); [INFO] [stdout] 31 + writeln!(source, "\tfn try_from(value: Value) -> Result<{name}, ()> {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:84:3 [INFO] [stdout] | [INFO] [stdout] 84 | write!(source, "\tenc.encode_vuint(buf, {});\n", req_fields.len()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 84 - write!(source, "\tenc.encode_vuint(buf, {});\n", req_fields.len()).unwrap(); [INFO] [stdout] 84 + writeln!(source, "\tenc.encode_vuint(buf, {});", req_fields.len()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | write!(source, "\t\tlet f_{name} = map.remove(&\"{name}\".into());\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 38 - write!(source, "\t\tlet f_{name} = map.remove(&\"{name}\".into());\n").unwrap(); [INFO] [stdout] 38 + writeln!(source, "\t\tlet f_{name} = map.remove(&\"{name}\".into());").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:86:3 [INFO] [stdout] | [INFO] [stdout] 86 | write!(source, "\tenc.encode_vuint(buf, {}\n", req_fields.len()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 86 - write!(source, "\tenc.encode_vuint(buf, {}\n", req_fields.len()).unwrap(); [INFO] [stdout] 86 + writeln!(source, "\tenc.encode_vuint(buf, {}", req_fields.len()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | write!(source, "\t\tlet f_{name} = map.remove(&\"{name}\".into()).ok_or(())?;\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 40 - write!(source, "\t\tlet f_{name} = map.remove(&\"{name}\".into()).ok_or(())?;\n") [INFO] [stdout] 40 + writeln!(source, "\t\tlet f_{name} = map.remove(&\"{name}\".into()).ok_or(())?;") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | write!(source, "\t\t+ ('{}' in value ? 1 : 0)\n", field.name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 88 - write!(source, "\t\t+ ('{}' in value ? 1 : 0)\n", field.name).unwrap(); [INFO] [stdout] 88 + writeln!(source, "\t\t+ ('{}' in value ? 1 : 0)", field.name).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:54:2 [INFO] [stdout] | [INFO] [stdout] 54 | write!(source, "\t\tOk({name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 54 - write!(source, "\t\tOk({name} {{\n").unwrap(); [INFO] [stdout] 54 + writeln!(source, "\t\tOk({name} {{").unwrap(); [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/encoding.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | encode_field(source, &field, ctx); [INFO] [stdout] | ^^^^^^ help: change this to: `field` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:98:3 [INFO] [stdout] | [INFO] [stdout] 98 | write!(source, "\tif ('{}' in value) {{\n", field.name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 98 - write!(source, "\tif ('{}' in value) {{\n", field.name).unwrap(); [INFO] [stdout] 98 + writeln!(source, "\tif ('{}' in value) {{", field.name).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:56:3 [INFO] [stdout] | [INFO] [stdout] 56 | write!(source, "\t\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 56 - write!(source, "\t\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] 56 + writeln!(source, "\t\t\t{name}: f_{name}, ").unwrap(); [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/encoding.rs:99:24 [INFO] [stdout] | [INFO] [stdout] 99 | encode_field(source, &field, ctx); [INFO] [stdout] | ^^^^^^ help: change this to: `field` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:106:2 [INFO] [stdout] | [INFO] [stdout] 106 | write!(source, "\tenc.encode_vuint(buf, {});\n", tag << 3 | size).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 106 - write!(source, "\tenc.encode_vuint(buf, {});\n", tag << 3 | size).unwrap(); [INFO] [stdout] 106 + writeln!(source, "\tenc.encode_vuint(buf, {});", tag << 3 | size).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:65:2 [INFO] [stdout] | [INFO] [stdout] 65 | write!(source, "impl Into for {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 65 - write!(source, "impl Into for {name} {{\n").unwrap(); [INFO] [stdout] 65 + writeln!(source, "impl Into for {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:107:2 [INFO] [stdout] | [INFO] [stdout] 107 | write!(source, "\tenc.encode_{ty}(buf, value.{name});\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 107 - write!(source, "\tenc.encode_{ty}(buf, value.{name});\n").unwrap(); [INFO] [stdout] 107 + writeln!(source, "\tenc.encode_{ty}(buf, value.{name});").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:72:4 [INFO] [stdout] | [INFO] [stdout] 72 | write!(source, "\t\tif let Some(value) = self.{name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 72 - write!(source, "\t\tif let Some(value) = self.{name} {{\n").unwrap(); [INFO] [stdout] 72 + writeln!(source, "\t\tif let Some(value) = self.{name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:111:2 [INFO] [stdout] | [INFO] [stdout] 111 | write!(source, "\tenc.encode_vuint(buf, {});\n", tag << 3 | 0b101).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 111 - write!(source, "\tenc.encode_vuint(buf, {});\n", tag << 3 | 0b101).unwrap(); [INFO] [stdout] 111 + writeln!(source, "\tenc.encode_vuint(buf, {});", tag << 3 | 0b101).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:76:4 [INFO] [stdout] | [INFO] [stdout] 76 | write!(source, "\t\tmap.insert(Key::from(\"{name}\"), self.{name}.into());\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 76 - write!(source, "\t\tmap.insert(Key::from(\"{name}\"), self.{name}.into());\n").unwrap(); [INFO] [stdout] 76 + writeln!(source, "\t\tmap.insert(Key::from(\"{name}\"), self.{name}.into());").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:112:2 [INFO] [stdout] | [INFO] [stdout] 112 | write!(source, "\tenc.encode_vuint(buf, {size});\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 112 - write!(source, "\tenc.encode_vuint(buf, {size});\n").unwrap(); [INFO] [stdout] 112 + writeln!(source, "\tenc.encode_vuint(buf, {size});").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:113:2 [INFO] [stdout] | [INFO] [stdout] 113 | write!(source, "\tenc.encode_{ty}(buf, value.{name});\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 113 - write!(source, "\tenc.encode_{ty}(buf, value.{name});\n").unwrap(); [INFO] [stdout] 113 + writeln!(source, "\tenc.encode_{ty}(buf, value.{name});").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:86:2 [INFO] [stdout] | [INFO] [stdout] 86 | write!(source, "impl TryFrom for {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 86 - write!(source, "impl TryFrom for {name} {{\n").unwrap(); [INFO] [stdout] 86 + writeln!(source, "impl TryFrom for {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:117:2 [INFO] [stdout] | [INFO] [stdout] 117 | write!(source, "\tenc.encode_vuint(buf, {});\n", tag << 3 | 0b101).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 117 - write!(source, "\tenc.encode_vuint(buf, {});\n", tag << 3 | 0b101).unwrap(); [INFO] [stdout] 117 + writeln!(source, "\tenc.encode_vuint(buf, {});", tag << 3 | 0b101).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:88:2 [INFO] [stdout] | [INFO] [stdout] 88 | write!(source, "\tfn try_from(value: Value) -> Result<{name}, ()> {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 88 - write!(source, "\tfn try_from(value: Value) -> Result<{name}, ()> {{\n").unwrap(); [INFO] [stdout] 88 + writeln!(source, "\tfn try_from(value: Value) -> Result<{name}, ()> {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:119:2 [INFO] [stdout] | [INFO] [stdout] 119 | write!(source, "\tlet size_ind_{size_ind_inst} = buf.pos;\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 119 - write!(source, "\tlet size_ind_{size_ind_inst} = buf.pos;\n").unwrap(); [INFO] [stdout] 119 + writeln!(source, "\tlet size_ind_{size_ind_inst} = buf.pos;").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:97:4 [INFO] [stdout] | [INFO] [stdout] 97 | write!(source, "\t\t\t\t\"{var_name}\" => Ok({name}::{var_name}),\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 97 - write!(source, "\t\t\t\t\"{var_name}\" => Ok({name}::{var_name}),\n").unwrap(); [INFO] [stdout] 97 + writeln!(source, "\t\t\t\t\"{var_name}\" => Ok({name}::{var_name}),").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:124:2 [INFO] [stdout] | [INFO] [stdout] 124 | write!(source, "{size_ind_inst} - 2, size_ind_{size_ind_inst}, 2);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 124 - write!(source, "{size_ind_inst} - 2, size_ind_{size_ind_inst}, 2);\n").unwrap(); [INFO] [stdout] 124 + writeln!(source, "{size_ind_inst} - 2, size_ind_{size_ind_inst}, 2);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | write!(source, "\t\t\t\t\"{var_name}\" => {name}_{var_name}_from_value(value),\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 108 - write!(source, "\t\t\t\t\"{var_name}\" => {name}_{var_name}_from_value(value),\n") [INFO] [stdout] 108 + writeln!(source, "\t\t\t\t\"{var_name}\" => {name}_{var_name}_from_value(value),") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:121:3 [INFO] [stdout] | [INFO] [stdout] 121 | write!(source, "fn {name}_{var_name}_from_value(value: Value) -> Result<{name}, ()> {{\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 121 - write!(source, "fn {name}_{var_name}_from_value(value: Value) -> Result<{name}, ()> {{\n") [INFO] [stdout] 121 + writeln!(source, "fn {name}_{var_name}_from_value(value: Value) -> Result<{name}, ()> {{") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js/encoding.rs:166:5 [INFO] [stdout] | [INFO] [stdout] 166 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:130:6 [INFO] [stdout] | [INFO] [stdout] 130 | write!(source, "\tlet f_{name} = map.remove(&\"{name}\".into());\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 130 - write!(source, "\tlet f_{name} = map.remove(&\"{name}\".into());\n").unwrap(); [INFO] [stdout] 130 + writeln!(source, "\tlet f_{name} = map.remove(&\"{name}\".into());").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js/encoding.rs:173:5 [INFO] [stdout] | [INFO] [stdout] 173 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:132:6 [INFO] [stdout] | [INFO] [stdout] 132 | write!(source, "\tlet f_{name} = map.remove(&\"{name}\".into()).ok_or(())?;\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 132 - write!(source, "\tlet f_{name} = map.remove(&\"{name}\".into()).ok_or(())?;\n") [INFO] [stdout] 132 + writeln!(source, "\tlet f_{name} = map.remove(&\"{name}\".into()).ok_or(())?;") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:146:3 [INFO] [stdout] | [INFO] [stdout] 146 | write!(source, "\tOk({name}::{var_name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 146 - write!(source, "\tOk({name}::{var_name} {{\n").unwrap(); [INFO] [stdout] 146 + writeln!(source, "\tOk({name}::{var_name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:148:4 [INFO] [stdout] | [INFO] [stdout] 148 | write!(source, "\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 148 - write!(source, "\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] 148 + writeln!(source, "\t\t{name}: f_{name}, ").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:158:2 [INFO] [stdout] | [INFO] [stdout] 158 | write!(source, "impl Into for {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 158 - write!(source, "impl Into for {name} {{\n").unwrap(); [INFO] [stdout] 158 + writeln!(source, "impl Into for {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:166:4 [INFO] [stdout] | [INFO] [stdout] 166 | write!(source, "{name}_{var_name}_to_value(self),\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 166 - write!(source, "{name}_{var_name}_to_value(self),\n").unwrap(); [INFO] [stdout] 166 + writeln!(source, "{name}_{var_name}_to_value(self),").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:179:3 [INFO] [stdout] | [INFO] [stdout] 179 | write!(source, "fn {name}_{var_name}_to_value(value: {name}) -> Value {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 179 - write!(source, "fn {name}_{var_name}_to_value(value: {name}) -> Value {{\n").unwrap(); [INFO] [stdout] 179 + writeln!(source, "fn {name}_{var_name}_to_value(value: {name}) -> Value {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:181:3 [INFO] [stdout] | [INFO] [stdout] 181 | write!(source, "\tlet {name}::{var_name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 181 - write!(source, "\tlet {name}::{var_name} {{\n").unwrap(); [INFO] [stdout] 181 + writeln!(source, "\tlet {name}::{var_name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:183:4 [INFO] [stdout] | [INFO] [stdout] 183 | write!(source, "\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 183 - write!(source, "\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] 183 + writeln!(source, "\t\t{name}: f_{name}, ").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:187:3 [INFO] [stdout] | [INFO] [stdout] 187 | write!(source, "\tlet mut map = HashMap::new();\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 187 - write!(source, "\tlet mut map = HashMap::new();\n").unwrap(); [INFO] [stdout] 187 + writeln!(source, "\tlet mut map = HashMap::new();").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:188:3 [INFO] [stdout] | [INFO] [stdout] 188 | write!(source, "\tmap.insert(\"$enum_variant\".into(), \"{var_name}\".into());\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 188 - write!(source, "\tmap.insert(\"$enum_variant\".into(), \"{var_name}\".into());\n").unwrap(); [INFO] [stdout] 188 + writeln!(source, "\tmap.insert(\"$enum_variant\".into(), \"{var_name}\".into());").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:192:5 [INFO] [stdout] | [INFO] [stdout] 192 | write!(source, "\tif let Some(value) = f_{name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 192 - write!(source, "\tif let Some(value) = f_{name} {{\n").unwrap(); [INFO] [stdout] 192 + writeln!(source, "\tif let Some(value) = f_{name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:260:2 [INFO] [stdout] | [INFO] [stdout] 260 | write!(source, "export function decode_{name}(buf: Buffer, cur: Cursor): {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 260 - write!(source, "export function decode_{name}(buf: Buffer, cur: Cursor): {name} {{\n").unwrap(); [INFO] [stdout] 260 + writeln!(source, "export function decode_{name}(buf: Buffer, cur: Cursor): {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:196:5 [INFO] [stdout] | [INFO] [stdout] 196 | write!(source, "\tmap.insert(Key::from(\"{name}\"), f_{name}.into());\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 196 - write!(source, "\tmap.insert(Key::from(\"{name}\"), f_{name}.into());\n").unwrap(); [INFO] [stdout] 196 + writeln!(source, "\tmap.insert(Key::from(\"{name}\"), f_{name}.into());").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:262:2 [INFO] [stdout] | [INFO] [stdout] 262 | write!(source, "\tswitch (enc.decode_vuint(buf, cur) as number) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 262 - write!(source, "\tswitch (enc.decode_vuint(buf, cur) as number) {{\n").unwrap(); [INFO] [stdout] 262 + writeln!(source, "\tswitch (enc.decode_vuint(buf, cur) as number) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:265:4 [INFO] [stdout] | [INFO] [stdout] 265 | write!(source, "\t\tcase {tag}: return decode_{name}_{var_name}(buf, cur);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 265 - write!(source, "\t\tcase {tag}: return decode_{name}_{var_name}(buf, cur);\n").unwrap(); [INFO] [stdout] 265 + writeln!(source, "\t\tcase {tag}: return decode_{name}_{var_name}(buf, cur);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rust.rs:36:38 [INFO] [stdout] | [INFO] [stdout] 36 | path_map.insert(decl.id, ["super", &resolved_path].join("::")); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `resolved_path` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:267:4 [INFO] [stdout] | [INFO] [stdout] 267 | write!(source, "\t\tcase {tag}: return {{ type: '{var_name}' }};\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 267 - write!(source, "\t\tcase {tag}: return {{ type: '{var_name}' }};\n").unwrap(); [INFO] [stdout] 267 + writeln!(source, "\t\tcase {tag}: return {{ type: '{var_name}' }};").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:275:3 [INFO] [stdout] | [INFO] [stdout] 275 | write!(source, "export function decode_{name}_{var_name}(buf: Buffer, cur: Cursor) {{\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 275 - write!(source, "export function decode_{name}_{var_name}(buf: Buffer, cur: Cursor) {{\n") [INFO] [stdout] 275 + writeln!(source, "export function decode_{name}_{var_name}(buf: Buffer, cur: Cursor) {{") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:278:3 [INFO] [stdout] | [INFO] [stdout] 278 | write!(source, "as {name} & {{ type: '{var_name}' }};\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 278 - write!(source, "as {name} & {{ type: '{var_name}' }};\n").unwrap(); [INFO] [stdout] 278 + writeln!(source, "as {name} & {{ type: '{var_name}' }};").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:295:4 [INFO] [stdout] | [INFO] [stdout] 295 | write!(source, "\t\tif (tag === {tag}) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 295 - write!(source, "\t\tif (tag === {tag}) {{\n").unwrap(); [INFO] [stdout] 295 + writeln!(source, "\t\tif (tag === {tag}) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:297:4 [INFO] [stdout] | [INFO] [stdout] 297 | write!(source, " else if (tag === {tag}) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 297 - write!(source, " else if (tag === {tag}) {{\n").unwrap(); [INFO] [stdout] 297 + writeln!(source, " else if (tag === {tag}) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:311:2 [INFO] [stdout] | [INFO] [stdout] 311 | write!(source, "\t\t\tvalue.{name} = enc.decode_{ty}(buf, cur);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 311 - write!(source, "\t\t\tvalue.{name} = enc.decode_{ty}(buf, cur);\n").unwrap(); [INFO] [stdout] 311 + writeln!(source, "\t\t\tvalue.{name} = enc.decode_{ty}(buf, cur);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:315:2 [INFO] [stdout] | [INFO] [stdout] 315 | write!(source, "\t\t\tvalue.{name} = enc.decode_{ty}(buf, cur);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 315 - write!(source, "\t\t\tvalue.{name} = enc.decode_{ty}(buf, cur);\n").unwrap(); [INFO] [stdout] 315 + writeln!(source, "\t\t\tvalue.{name} = enc.decode_{ty}(buf, cur);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/js/encoding.rs:354:5 [INFO] [stdout] | [INFO] [stdout] 354 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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/encoding.rs:361:5 [INFO] [stdout] | [INFO] [stdout] 361 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:425:4 [INFO] [stdout] | [INFO] [stdout] 425 | write!(source, "\t\t\tvalue.{name} = decode_{type_name}(buf, cur);\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 425 - write!(source, "\t\t\tvalue.{name} = decode_{type_name}(buf, cur);\n",).unwrap(); [INFO] [stdout] 425 + writeln!(source, "\t\t\tvalue.{name} = decode_{type_name}(buf, cur);",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/encoding.rs:432:4 [INFO] [stdout] | [INFO] [stdout] 432 | write!(source, ".decode_{type_name}(buf, cur);\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 432 - write!(source, ".decode_{type_name}(buf, cur);\n",).unwrap(); [INFO] [stdout] 432 + writeln!(source, ".decode_{type_name}(buf, cur);",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/root.rs:7:2 [INFO] [stdout] | [INFO] [stdout] 7 | write!(source, "// generated from {in_dir}\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 7 - write!(source, "// generated from {in_dir}\n").unwrap(); [INFO] [stdout] 7 + writeln!(source, "// generated from {in_dir}").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/root.rs:11:3 [INFO] [stdout] | [INFO] [stdout] 11 | write!(source, "import * as ns_{resolved_path} from \"./{resolved_path}.ts\";\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 11 - write!(source, "import * as ns_{resolved_path} from \"./{resolved_path}.ts\";\n").unwrap(); [INFO] [stdout] 11 + writeln!(source, "import * as ns_{resolved_path} from \"./{resolved_path}.ts\";").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:88:7 [INFO] [stdout] | [INFO] [stdout] 88 | if !entry.extension().is_some_and(|ext| ext == "stomd") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `entry.extension().is_none_or(|ext| ext != "stomd")` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/root.rs:23:3 [INFO] [stdout] | [INFO] [stdout] 23 | write!(source, "\t\tcase '{rel_path}': {{ switch (enc.decode_vuint(buf, cur)) {{\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 23 - write!(source, "\t\tcase '{rel_path}': {{ switch (enc.decode_vuint(buf, cur)) {{\n") [INFO] [stdout] 23 + writeln!(source, "\t\tcase '{rel_path}': {{ switch (enc.decode_vuint(buf, cur)) {{") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/js/root.rs:25:20 [INFO] [stdout] | [INFO] [stdout] 25 | for (_, item) in &decl.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 25 - for (_, item) in &decl.items { [INFO] [stdout] 25 + for item in decl.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:83:7 [INFO] [stdout] | [INFO] [stdout] 83 | if rel_path == "" { file_name.to_string() } else { [&rel_path, file_name].join("/") }; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `rel_path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/root.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | write!(source, ".decode_{}(buf, cur) as any;\n", item.name()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 27 - write!(source, ".decode_{}(buf, cur) as any;\n", item.name()).unwrap(); [INFO] [stdout] 27 + writeln!(source, ".decode_{}(buf, cur) as any;", item.name()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/js/type_def.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 9 | for (_, item) in &file.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 9 - for (_, item) in &file.items { [INFO] [stdout] 9 + for item in file.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js/type_def.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | write!(source, "export interface {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 12 - write!(source, "export interface {name} {{\n").unwrap(); [INFO] [stdout] 12 + writeln!(source, "export interface {name} {{").unwrap(); [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/type_def.rs:55:22 [INFO] [stdout] | [INFO] [stdout] 55 | write_type(source, &typeid, used_files, ctx).unwrap(); [INFO] [stdout] | ^^^^^^^ help: change this to: `typeid` [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: passing a unit value to a function [INFO] [stdout] --> src/js/type_def.rs:83:2 [INFO] [stdout] | [INFO] [stdout] 83 | / Some(if typeid.is_builtin() { [INFO] [stdout] 84 | | match typeid.id { [INFO] [stdout] 85 | | ARR_TYPEID => { [INFO] [stdout] 86 | | source.push_str("Array<"); [INFO] [stdout] ... | [INFO] [stdout] 114 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 83 ~ let _: () = if typeid.is_builtin() { [INFO] [stdout] 84 ~ match typeid.id { [INFO] [stdout] 85 ~ ARR_TYPEID => { [INFO] [stdout] 86 ~ source.push_str("Array<"); [INFO] [stdout] 87 ~ write_type(source, typeid.item(), used_files, ctx); [INFO] [stdout] 88 ~ source.push('>'); [INFO] [stdout] 89 ~ } [INFO] [stdout] 90 ~ MAP_TYPEID => { [INFO] [stdout] 91 ~ source.push_str("Map<"); [INFO] [stdout] 92 ~ source.push_str(resolve_built_in_type(typeid.variant)); [INFO] [stdout] 93 ~ source.push_str(", "); [INFO] [stdout] 94 ~ write_type(source, typeid.item(), used_files, ctx); [INFO] [stdout] 95 ~ source.push('>'); [INFO] [stdout] 96 ~ } [INFO] [stdout] 97 ~ id => source.push_str(resolve_built_in_type(id)), [INFO] [stdout] 98 ~ } [INFO] [stdout] 99 ~ // user-defined type [INFO] [stdout] 100 ~ } else { [INFO] [stdout] 101 ~ let Ctx { file, provider, path_map } = ctx; [INFO] [stdout] 102 ~ // same file [INFO] [stdout] 103 ~ if typeid.ns == file.id { [INFO] [stdout] 104 ~ source.push_str(file.get_by_id(typeid.id)?.name()); [INFO] [stdout] 105 ~ } else { [INFO] [stdout] 106 ~ // write ns.type_name [INFO] [stdout] 107 ~ used_files.insert(typeid.ns); [INFO] [stdout] 108 ~ let file = provider.get(typeid.ns); [INFO] [stdout] 109 ~ source.push_str("ns_"); [INFO] [stdout] 110 ~ source.push_str(path_map.get(&file.id)?); [INFO] [stdout] 111 ~ source.push('.'); [INFO] [stdout] 112 ~ source.push_str(file.get_by_id(typeid.id)?.name()); [INFO] [stdout] 113 ~ } [INFO] [stdout] 114 ~ }; [INFO] [stdout] 115 + Some(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/js.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | write!(source, "import * as ns_{path} from \"./{path}.ts\";\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 49 - write!(source, "import * as ns_{path} from \"./{path}.ts\";\n").unwrap(); [INFO] [stdout] 49 + writeln!(source, "import * as ns_{path} from \"./{path}.ts\";").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/rust/encoding.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | for (_, item) in &file.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 13 - for (_, item) in &file.items { [INFO] [stdout] 13 + for item in file.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | write!(source, "pub fn encode_{name}(data: &mut Vec, value: &{name}) {{\n",) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 16 - write!(source, "pub fn encode_{name}(data: &mut Vec, value: &{name}) {{\n",) [INFO] [stdout] 16 + writeln!(source, "pub fn encode_{name}(data: &mut Vec, value: &{name}) {{",) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | write!(source, " -> Option<{name}> {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 22 - write!(source, " -> Option<{name}> {{\n").unwrap(); [INFO] [stdout] 22 + writeln!(source, " -> Option<{name}> {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:38:2 [INFO] [stdout] | [INFO] [stdout] 38 | write!(source, "pub fn encode_{name}(data: &mut Vec, value: &{name}) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 38 - write!(source, "pub fn encode_{name}(data: &mut Vec, value: &{name}) {{\n").unwrap(); [INFO] [stdout] 38 + writeln!(source, "pub fn encode_{name}(data: &mut Vec, value: &{name}) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:45:4 [INFO] [stdout] | [INFO] [stdout] 45 | write!(source, "\t\t\tencode_vuint(data, {tag});\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 45 - write!(source, "\t\t\tencode_vuint(data, {tag});\n",).unwrap(); [INFO] [stdout] 45 + writeln!(source, "\t\t\tencode_vuint(data, {tag});",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:46:4 [INFO] [stdout] | [INFO] [stdout] 46 | write!(source, "\t\t\tencode_{name}_{var_name}(data, value);\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 46 - write!(source, "\t\t\tencode_{name}_{var_name}(data, value);\n",).unwrap(); [INFO] [stdout] 46 + writeln!(source, "\t\t\tencode_{name}_{var_name}(data, value);",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:58:3 [INFO] [stdout] | [INFO] [stdout] 58 | write!(source, "value: &{name}) {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 58 - write!(source, "value: &{name}) {{\n").unwrap(); [INFO] [stdout] 58 + writeln!(source, "value: &{name}) {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:78:3 [INFO] [stdout] | [INFO] [stdout] 78 | write!(source, "\tencode_vuint(data, {});\n", req_fields.len()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 78 - write!(source, "\tencode_vuint(data, {});\n", req_fields.len()).unwrap(); [INFO] [stdout] 78 + writeln!(source, "\tencode_vuint(data, {});", req_fields.len()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:80:3 [INFO] [stdout] | [INFO] [stdout] 80 | write!(source, "\tencode_vuint(data, {}\n", req_fields.len()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 80 - write!(source, "\tencode_vuint(data, {}\n", req_fields.len()).unwrap(); [INFO] [stdout] 80 + writeln!(source, "\tencode_vuint(data, {}", req_fields.len()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:82:4 [INFO] [stdout] | [INFO] [stdout] 82 | write!(source, "\t\t+ if f_{}.is_some() {{1}} else {{0}}\n", field.name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 82 - write!(source, "\t\t+ if f_{}.is_some() {{1}} else {{0}}\n", field.name).unwrap(); [INFO] [stdout] 82 + writeln!(source, "\t\t+ if f_{}.is_some() {{1}} else {{0}}", field.name).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rust/encoding.rs:88:24 [INFO] [stdout] | [INFO] [stdout] 88 | encode_field(source, &field, ctx); [INFO] [stdout] | ^^^^^^ help: change this to: `field` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:91:3 [INFO] [stdout] | [INFO] [stdout] 91 | write!(source, "\tif let Some(f_{0}) = f_{0} {{\n", field.name).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 91 - write!(source, "\tif let Some(f_{0}) = f_{0} {{\n", field.name).unwrap(); [INFO] [stdout] 91 + writeln!(source, "\tif let Some(f_{0}) = f_{0} {{", field.name).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rust/encoding.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | encode_field(source, &field, ctx); [INFO] [stdout] | ^^^^^^ help: change this to: `field` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:99:2 [INFO] [stdout] | [INFO] [stdout] 99 | write!(source, "\tencode_vuint(data, {});\n", tag << 3 | size).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 99 - write!(source, "\tencode_vuint(data, {});\n", tag << 3 | size).unwrap(); [INFO] [stdout] 99 + writeln!(source, "\tencode_vuint(data, {});", tag << 3 | size).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:100:2 [INFO] [stdout] | [INFO] [stdout] 100 | write!(source, "\tencode_{ty}(data, {}f_{name});\n", if is_copy { "*" } else { "&" }).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 100 - write!(source, "\tencode_{ty}(data, {}f_{name});\n", if is_copy { "*" } else { "&" }).unwrap(); [INFO] [stdout] 100 + writeln!(source, "\tencode_{ty}(data, {}f_{name});", if is_copy { "*" } else { "&" }).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:104:2 [INFO] [stdout] | [INFO] [stdout] 104 | write!(source, "\tencode_vuint(data, {});\n", tag << 3 | field_len::LEN).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 104 - write!(source, "\tencode_vuint(data, {});\n", tag << 3 | field_len::LEN).unwrap(); [INFO] [stdout] 104 + writeln!(source, "\tencode_vuint(data, {});", tag << 3 | field_len::LEN).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:105:2 [INFO] [stdout] | [INFO] [stdout] 105 | write!(source, "\tencode_vuint(data, {size});\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 105 - write!(source, "\tencode_vuint(data, {size});\n").unwrap(); [INFO] [stdout] 105 + writeln!(source, "\tencode_vuint(data, {size});").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:106:2 [INFO] [stdout] | [INFO] [stdout] 106 | write!(source, "\tencode_{ty}(data, f_{name});\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 106 - write!(source, "\tencode_{ty}(data, f_{name});\n").unwrap(); [INFO] [stdout] 106 + writeln!(source, "\tencode_{ty}(data, f_{name});").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:109:2 [INFO] [stdout] | [INFO] [stdout] 109 | write!(source, "\tencode_vuint(data, {});\n", tag << 3 | 0b101).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 109 - write!(source, "\tencode_vuint(data, {});\n", tag << 3 | 0b101).unwrap(); [INFO] [stdout] 109 + writeln!(source, "\tencode_vuint(data, {});", tag << 3 | 0b101).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/rust/encoding.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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/rust/encoding.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:255:2 [INFO] [stdout] | [INFO] [stdout] 255 | write!(source, "pub fn decode_{name}(data: &[u8], ind: &mut usize) -> Option<{name}> {{\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 255 - write!(source, "pub fn decode_{name}(data: &[u8], ind: &mut usize) -> Option<{name}> {{\n") [INFO] [stdout] 255 + writeln!(source, "pub fn decode_{name}(data: &[u8], ind: &mut usize) -> Option<{name}> {{") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:258:2 [INFO] [stdout] | [INFO] [stdout] 258 | write!(source, "\tmatch decode_vuint(data, ind)? {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 258 - write!(source, "\tmatch decode_vuint(data, ind)? {{\n").unwrap(); [INFO] [stdout] 258 + writeln!(source, "\tmatch decode_vuint(data, ind)? {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:261:4 [INFO] [stdout] | [INFO] [stdout] 261 | write!(source, "\t\t{tag} => decode_{name}_{var_name}(data, ind),\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 261 - write!(source, "\t\t{tag} => decode_{name}_{var_name}(data, ind),\n").unwrap(); [INFO] [stdout] 261 + writeln!(source, "\t\t{tag} => decode_{name}_{var_name}(data, ind),").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:263:4 [INFO] [stdout] | [INFO] [stdout] 263 | write!(source, "\t\t{tag} => Some({name}::{var_name}),\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 263 - write!(source, "\t\t{tag} => Some({name}::{var_name}),\n").unwrap(); [INFO] [stdout] 263 + writeln!(source, "\t\t{tag} => Some({name}::{var_name}),").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:281:3 [INFO] [stdout] | [INFO] [stdout] 281 | write!(source, "\tlet mut f_{name} = None;\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 281 - write!(source, "\tlet mut f_{name} = None;\n").unwrap(); [INFO] [stdout] 281 + writeln!(source, "\tlet mut f_{name} = None;").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:291:4 [INFO] [stdout] | [INFO] [stdout] 291 | write!(source, "\t\tif tag == {tag} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 291 - write!(source, "\t\tif tag == {tag} {{\n").unwrap(); [INFO] [stdout] 291 + writeln!(source, "\t\tif tag == {tag} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:293:4 [INFO] [stdout] | [INFO] [stdout] 293 | write!(source, " else if tag == {tag} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 293 - write!(source, " else if tag == {tag} {{\n").unwrap(); [INFO] [stdout] 293 + writeln!(source, " else if tag == {tag} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:304:3 [INFO] [stdout] | [INFO] [stdout] 304 | write!(source, "\tlet Some(f_{name}) = f_{name} else {{ return None; }};\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 304 - write!(source, "\tlet Some(f_{name}) = f_{name} else {{ return None; }};\n").unwrap(); [INFO] [stdout] 304 + writeln!(source, "\tlet Some(f_{name}) = f_{name} else {{ return None; }};").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:306:2 [INFO] [stdout] | [INFO] [stdout] 306 | write!(source, "\tSome({name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 306 - write!(source, "\tSome({name} {{\n").unwrap(); [INFO] [stdout] 306 + writeln!(source, "\tSome({name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:309:4 [INFO] [stdout] | [INFO] [stdout] 309 | write!(source, "\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 309 - write!(source, "\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] 309 + writeln!(source, "\t\t{name}: f_{name}, ").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:317:2 [INFO] [stdout] | [INFO] [stdout] 317 | write!(source, "\t\t\tf_{name} = Some(decode_{ty}(data, ind)?);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 317 - write!(source, "\t\t\tf_{name} = Some(decode_{ty}(data, ind)?);\n").unwrap(); [INFO] [stdout] 317 + writeln!(source, "\t\t\tf_{name} = Some(decode_{ty}(data, ind)?);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:321:2 [INFO] [stdout] | [INFO] [stdout] 321 | write!(source, "\t\t\tf_{name} = Some(decode_{ty}(data, ind)?);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 321 - write!(source, "\t\t\tf_{name} = Some(decode_{ty}(data, ind)?);\n").unwrap(); [INFO] [stdout] 321 + writeln!(source, "\t\t\tf_{name} = Some(decode_{ty}(data, ind)?);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/rust/encoding.rs:362:5 [INFO] [stdout] | [INFO] [stdout] 362 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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/rust/encoding.rs:369:5 [INFO] [stdout] | [INFO] [stdout] 369 | source.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `source.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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:432:4 [INFO] [stdout] | [INFO] [stdout] 432 | write!(source, "\t\t\tf_{name} = Some(decode_{type_name}(data, ind)?);\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 432 - write!(source, "\t\t\tf_{name} = Some(decode_{type_name}(data, ind)?);\n",).unwrap(); [INFO] [stdout] 432 + writeln!(source, "\t\t\tf_{name} = Some(decode_{type_name}(data, ind)?);",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/encoding.rs:439:4 [INFO] [stdout] | [INFO] [stdout] 439 | write!(source, "::decode_{type_name}(data, ind)?);\n",).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 439 - write!(source, "::decode_{type_name}(data, ind)?);\n",).unwrap(); [INFO] [stdout] 439 + writeln!(source, "::decode_{type_name}(data, ind)?);",).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/root.rs:7:2 [INFO] [stdout] | [INFO] [stdout] 7 | write!(source, "// generated from {in_dir}\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 7 - write!(source, "// generated from {in_dir}\n").unwrap(); [INFO] [stdout] 7 + writeln!(source, "// generated from {in_dir}").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/root.rs:13:3 [INFO] [stdout] | [INFO] [stdout] 13 | write!(source, "pub mod {resolved_path};\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 13 - write!(source, "pub mod {resolved_path};\n").unwrap(); [INFO] [stdout] 13 + writeln!(source, "pub mod {resolved_path};").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/root.rs:23:3 [INFO] [stdout] | [INFO] [stdout] 23 | write!(source, "\t\t{rel_path:?} => match decode_vuint(data, &mut ind)? {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 23 - write!(source, "\t\t{rel_path:?} => match decode_vuint(data, &mut ind)? {{\n").unwrap(); [INFO] [stdout] 23 + writeln!(source, "\t\t{rel_path:?} => match decode_vuint(data, &mut ind)? {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/rust/root.rs:25:20 [INFO] [stdout] | [INFO] [stdout] 25 | for (_, item) in &decl.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 25 - for (_, item) in &decl.items { [INFO] [stdout] 25 + for item in decl.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/root.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | write!(source, "::decode_{}(data, &mut ind)?),\n", item.name()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 27 - write!(source, "::decode_{}(data, &mut ind)?),\n", item.name()).unwrap(); [INFO] [stdout] 27 + writeln!(source, "::decode_{}(data, &mut ind)?),", item.name()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/rust/type_def.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | for (_, item) in &file.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 13 - for (_, item) in &file.items { [INFO] [stdout] 13 + for item in file.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/rust/type_def.rs:25:19 [INFO] [stdout] | [INFO] [stdout] 25 | for (_, item) in &file.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 25 - for (_, item) in &file.items { [INFO] [stdout] 25 + for item in file.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:43:2 [INFO] [stdout] | [INFO] [stdout] 43 | write!(source, "pub enum {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 43 - write!(source, "pub enum {name} {{\n").unwrap(); [INFO] [stdout] 43 + writeln!(source, "pub enum {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:63:2 [INFO] [stdout] | [INFO] [stdout] 63 | write!(source, "impl Default for {} {{\n", item.name()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 63 - write!(source, "impl Default for {} {{\n", item.name()).unwrap(); [INFO] [stdout] 63 + writeln!(source, "impl Default for {} {{", item.name()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:168:2 [INFO] [stdout] | [INFO] [stdout] 168 | write!(source, "impl Serialized for {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 168 - write!(source, "impl Serialized for {name} {{\n").unwrap(); [INFO] [stdout] 168 + writeln!(source, "impl Serialized for {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:178:2 [INFO] [stdout] | [INFO] [stdout] 178 | write!(source, "\t\tencode_{name}(&mut data, self);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 178 - write!(source, "\t\tencode_{name}(&mut data, self);\n").unwrap(); [INFO] [stdout] 178 + writeln!(source, "\t\tencode_{name}(&mut data, self);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:184:2 [INFO] [stdout] | [INFO] [stdout] 184 | write!(source, "\t\tencode_{name}(data, self);\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 184 - write!(source, "\t\tencode_{name}(data, self);\n").unwrap(); [INFO] [stdout] 184 + writeln!(source, "\t\tencode_{name}(data, self);").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:188:2 [INFO] [stdout] | [INFO] [stdout] 188 | write!(source, "\tfn decode(data: &[u8]) -> Option<{name}> {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 188 - write!(source, "\tfn decode(data: &[u8]) -> Option<{name}> {{\n").unwrap(); [INFO] [stdout] 188 + writeln!(source, "\tfn decode(data: &[u8]) -> Option<{name}> {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:191:2 [INFO] [stdout] | [INFO] [stdout] 191 | write!(source, "\t\tif decode_str(data, &mut ind)? != {file:?} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 191 - write!(source, "\t\tif decode_str(data, &mut ind)? != {file:?} {{\n").unwrap(); [INFO] [stdout] 191 + writeln!(source, "\t\tif decode_str(data, &mut ind)? != {file:?} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:194:2 [INFO] [stdout] | [INFO] [stdout] 194 | write!(source, "\t\tif decode_vuint(data, &mut ind)? != {} {{\n", item.typeid()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 194 - write!(source, "\t\tif decode_vuint(data, &mut ind)? != {} {{\n", item.typeid()).unwrap(); [INFO] [stdout] 194 + writeln!(source, "\t\tif decode_vuint(data, &mut ind)? != {} {{", item.typeid()).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:197:2 [INFO] [stdout] | [INFO] [stdout] 197 | write!(source, "\t\tlet value = decode_{name}(data, &mut ind)?;\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 197 - write!(source, "\t\tlet value = decode_{name}(data, &mut ind)?;\n").unwrap(); [INFO] [stdout] 197 + writeln!(source, "\t\tlet value = decode_{name}(data, &mut ind)?;").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:203:2 [INFO] [stdout] | [INFO] [stdout] 203 | write!(source, "\tfn decode_headless(data: &[u8]) -> Option<{name}> {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 203 - write!(source, "\tfn decode_headless(data: &[u8]) -> Option<{name}> {{\n").unwrap(); [INFO] [stdout] 203 + writeln!(source, "\tfn decode_headless(data: &[u8]) -> Option<{name}> {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:205:2 [INFO] [stdout] | [INFO] [stdout] 205 | write!(source, "\t\tlet value = decode_{name}(data, &mut ind)?;\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 205 - write!(source, "\t\tlet value = decode_{name}(data, &mut ind)?;\n").unwrap(); [INFO] [stdout] 205 + writeln!(source, "\t\tlet value = decode_{name}(data, &mut ind)?;").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:211:2 [INFO] [stdout] | [INFO] [stdout] 211 | write!(source, "\tfn decode_inline(data: &[u8], ind: &mut usize) -> Option<{name}> {{\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 211 - write!(source, "\tfn decode_inline(data: &[u8], ind: &mut usize) -> Option<{name}> {{\n") [INFO] [stdout] 211 + writeln!(source, "\tfn decode_inline(data: &[u8], ind: &mut usize) -> Option<{name}> {{") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/type_def.rs:213:2 [INFO] [stdout] | [INFO] [stdout] 213 | write!(source, "\t\tdecode_{name}(data, ind)\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 213 - write!(source, "\t\tdecode_{name}(data, ind)\n").unwrap(); [INFO] [stdout] 213 + writeln!(source, "\t\tdecode_{name}(data, ind)").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/rust/value.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | for (_, item) in &file.items { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 10 - for (_, item) in &file.items { [INFO] [stdout] 10 + for item in file.items.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:29:2 [INFO] [stdout] | [INFO] [stdout] 29 | write!(source, "impl TryFrom for {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 29 - write!(source, "impl TryFrom for {name} {{\n").unwrap(); [INFO] [stdout] 29 + writeln!(source, "impl TryFrom for {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:31:2 [INFO] [stdout] | [INFO] [stdout] 31 | write!(source, "\tfn try_from(value: Value) -> Result<{name}, ()> {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 31 - write!(source, "\tfn try_from(value: Value) -> Result<{name}, ()> {{\n").unwrap(); [INFO] [stdout] 31 + writeln!(source, "\tfn try_from(value: Value) -> Result<{name}, ()> {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | write!(source, "\t\tlet f_{name} = map.remove(&\"{name}\".into());\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 38 - write!(source, "\t\tlet f_{name} = map.remove(&\"{name}\".into());\n").unwrap(); [INFO] [stdout] 38 + writeln!(source, "\t\tlet f_{name} = map.remove(&\"{name}\".into());").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | write!(source, "\t\tlet f_{name} = map.remove(&\"{name}\".into()).ok_or(())?;\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 40 - write!(source, "\t\tlet f_{name} = map.remove(&\"{name}\".into()).ok_or(())?;\n") [INFO] [stdout] 40 + writeln!(source, "\t\tlet f_{name} = map.remove(&\"{name}\".into()).ok_or(())?;") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:54:2 [INFO] [stdout] | [INFO] [stdout] 54 | write!(source, "\t\tOk({name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 54 - write!(source, "\t\tOk({name} {{\n").unwrap(); [INFO] [stdout] 54 + writeln!(source, "\t\tOk({name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:56:3 [INFO] [stdout] | [INFO] [stdout] 56 | write!(source, "\t\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 56 - write!(source, "\t\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] 56 + writeln!(source, "\t\t\t{name}: f_{name}, ").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:65:2 [INFO] [stdout] | [INFO] [stdout] 65 | write!(source, "impl Into for {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 65 - write!(source, "impl Into for {name} {{\n").unwrap(); [INFO] [stdout] 65 + writeln!(source, "impl Into for {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:72:4 [INFO] [stdout] | [INFO] [stdout] 72 | write!(source, "\t\tif let Some(value) = self.{name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 72 - write!(source, "\t\tif let Some(value) = self.{name} {{\n").unwrap(); [INFO] [stdout] 72 + writeln!(source, "\t\tif let Some(value) = self.{name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:76:4 [INFO] [stdout] | [INFO] [stdout] 76 | write!(source, "\t\tmap.insert(Key::from(\"{name}\"), self.{name}.into());\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 76 - write!(source, "\t\tmap.insert(Key::from(\"{name}\"), self.{name}.into());\n").unwrap(); [INFO] [stdout] 76 + writeln!(source, "\t\tmap.insert(Key::from(\"{name}\"), self.{name}.into());").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:86:2 [INFO] [stdout] | [INFO] [stdout] 86 | write!(source, "impl TryFrom for {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 86 - write!(source, "impl TryFrom for {name} {{\n").unwrap(); [INFO] [stdout] 86 + writeln!(source, "impl TryFrom for {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:88:2 [INFO] [stdout] | [INFO] [stdout] 88 | write!(source, "\tfn try_from(value: Value) -> Result<{name}, ()> {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 88 - write!(source, "\tfn try_from(value: Value) -> Result<{name}, ()> {{\n").unwrap(); [INFO] [stdout] 88 + writeln!(source, "\tfn try_from(value: Value) -> Result<{name}, ()> {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:97:4 [INFO] [stdout] | [INFO] [stdout] 97 | write!(source, "\t\t\t\t\"{var_name}\" => Ok({name}::{var_name}),\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 97 - write!(source, "\t\t\t\t\"{var_name}\" => Ok({name}::{var_name}),\n").unwrap(); [INFO] [stdout] 97 + writeln!(source, "\t\t\t\t\"{var_name}\" => Ok({name}::{var_name}),").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | write!(source, "\t\t\t\t\"{var_name}\" => {name}_{var_name}_from_value(value),\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 108 - write!(source, "\t\t\t\t\"{var_name}\" => {name}_{var_name}_from_value(value),\n") [INFO] [stdout] 108 + writeln!(source, "\t\t\t\t\"{var_name}\" => {name}_{var_name}_from_value(value),") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:121:3 [INFO] [stdout] | [INFO] [stdout] 121 | write!(source, "fn {name}_{var_name}_from_value(value: Value) -> Result<{name}, ()> {{\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 121 - write!(source, "fn {name}_{var_name}_from_value(value: Value) -> Result<{name}, ()> {{\n") [INFO] [stdout] 121 + writeln!(source, "fn {name}_{var_name}_from_value(value: Value) -> Result<{name}, ()> {{") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:130:6 [INFO] [stdout] | [INFO] [stdout] 130 | write!(source, "\tlet f_{name} = map.remove(&\"{name}\".into());\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 130 - write!(source, "\tlet f_{name} = map.remove(&\"{name}\".into());\n").unwrap(); [INFO] [stdout] 130 + writeln!(source, "\tlet f_{name} = map.remove(&\"{name}\".into());").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:132:6 [INFO] [stdout] | [INFO] [stdout] 132 | write!(source, "\tlet f_{name} = map.remove(&\"{name}\".into()).ok_or(())?;\n") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 132 - write!(source, "\tlet f_{name} = map.remove(&\"{name}\".into()).ok_or(())?;\n") [INFO] [stdout] 132 + writeln!(source, "\tlet f_{name} = map.remove(&\"{name}\".into()).ok_or(())?;") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:146:3 [INFO] [stdout] | [INFO] [stdout] 146 | write!(source, "\tOk({name}::{var_name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 146 - write!(source, "\tOk({name}::{var_name} {{\n").unwrap(); [INFO] [stdout] 146 + writeln!(source, "\tOk({name}::{var_name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:148:4 [INFO] [stdout] | [INFO] [stdout] 148 | write!(source, "\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 148 - write!(source, "\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] 148 + writeln!(source, "\t\t{name}: f_{name}, ").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:158:2 [INFO] [stdout] | [INFO] [stdout] 158 | write!(source, "impl Into for {name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 158 - write!(source, "impl Into for {name} {{\n").unwrap(); [INFO] [stdout] 158 + writeln!(source, "impl Into for {name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:166:4 [INFO] [stdout] | [INFO] [stdout] 166 | write!(source, "{name}_{var_name}_to_value(self),\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 166 - write!(source, "{name}_{var_name}_to_value(self),\n").unwrap(); [INFO] [stdout] 166 + writeln!(source, "{name}_{var_name}_to_value(self),").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:179:3 [INFO] [stdout] | [INFO] [stdout] 179 | write!(source, "fn {name}_{var_name}_to_value(value: {name}) -> Value {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 179 - write!(source, "fn {name}_{var_name}_to_value(value: {name}) -> Value {{\n").unwrap(); [INFO] [stdout] 179 + writeln!(source, "fn {name}_{var_name}_to_value(value: {name}) -> Value {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:181:3 [INFO] [stdout] | [INFO] [stdout] 181 | write!(source, "\tlet {name}::{var_name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 181 - write!(source, "\tlet {name}::{var_name} {{\n").unwrap(); [INFO] [stdout] 181 + writeln!(source, "\tlet {name}::{var_name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:183:4 [INFO] [stdout] | [INFO] [stdout] 183 | write!(source, "\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 183 - write!(source, "\t\t{name}: f_{name}, \n").unwrap(); [INFO] [stdout] 183 + writeln!(source, "\t\t{name}: f_{name}, ").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:187:3 [INFO] [stdout] | [INFO] [stdout] 187 | write!(source, "\tlet mut map = HashMap::new();\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 187 - write!(source, "\tlet mut map = HashMap::new();\n").unwrap(); [INFO] [stdout] 187 + writeln!(source, "\tlet mut map = HashMap::new();").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:188:3 [INFO] [stdout] | [INFO] [stdout] 188 | write!(source, "\tmap.insert(\"$enum_variant\".into(), \"{var_name}\".into());\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 188 - write!(source, "\tmap.insert(\"$enum_variant\".into(), \"{var_name}\".into());\n").unwrap(); [INFO] [stdout] 188 + writeln!(source, "\tmap.insert(\"$enum_variant\".into(), \"{var_name}\".into());").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:192:5 [INFO] [stdout] | [INFO] [stdout] 192 | write!(source, "\tif let Some(value) = f_{name} {{\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 192 - write!(source, "\tif let Some(value) = f_{name} {{\n").unwrap(); [INFO] [stdout] 192 + writeln!(source, "\tif let Some(value) = f_{name} {{").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/rust/value.rs:196:5 [INFO] [stdout] | [INFO] [stdout] 196 | write!(source, "\tmap.insert(Key::from(\"{name}\"), f_{name}.into());\n").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 196 - write!(source, "\tmap.insert(Key::from(\"{name}\"), f_{name}.into());\n").unwrap(); [INFO] [stdout] 196 + writeln!(source, "\tmap.insert(Key::from(\"{name}\"), f_{name}.into());").unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rust.rs:36:38 [INFO] [stdout] | [INFO] [stdout] 36 | path_map.insert(decl.id, ["super", &resolved_path].join("::")); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `resolved_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:88:7 [INFO] [stdout] | [INFO] [stdout] 88 | if !entry.extension().is_some_and(|ext| ext == "stomd") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `entry.extension().is_none_or(|ext| ext != "stomd")` [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: comparison to empty slice [INFO] [stdout] --> src/main.rs:83:7 [INFO] [stdout] | [INFO] [stdout] 83 | if rel_path == "" { file_name.to_string() } else { [&rel_path, file_name].join("/") }; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `rel_path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.44s [INFO] running `Command { std: "docker" "inspect" "64a98cfdacdad1b2302287c68564679b910ad30d6eb6c1674842f9ec53172a48", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "64a98cfdacdad1b2302287c68564679b910ad30d6eb6c1674842f9ec53172a48", kill_on_drop: false }` [INFO] [stdout] 64a98cfdacdad1b2302287c68564679b910ad30d6eb6c1674842f9ec53172a48