[INFO] fetching crate json-fixer 0.1.0... [INFO] linting json-fixer-0.1.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate json-fixer 0.1.0 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate json-fixer 0.1.0 [INFO] finished tweaking crates.io crate json-fixer 0.1.0 [INFO] tweaked toml for crates.io crate json-fixer 0.1.0 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate json-fixer 0.1.0 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 json-fixer 0.1.0 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] Downloading crates ... [INFO] [stderr] Downloaded is-terminal v0.4.14 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e7e3988a7208d09b34d93a0319b1a233432aaa2509e3665c1e0a952da5f4e36b [INFO] running `Command { std: "docker" "start" "-a" "e7e3988a7208d09b34d93a0319b1a233432aaa2509e3665c1e0a952da5f4e36b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e7e3988a7208d09b34d93a0319b1a233432aaa2509e3665c1e0a952da5f4e36b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e7e3988a7208d09b34d93a0319b1a233432aaa2509e3665c1e0a952da5f4e36b", kill_on_drop: false }` [INFO] [stdout] e7e3988a7208d09b34d93a0319b1a233432aaa2509e3665c1e0a952da5f4e36b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 36066c6c3777c9e4b713e05eecf569143a24b14a27db4385d58df41bdc165041 [INFO] running `Command { std: "docker" "start" "-a" "36066c6c3777c9e4b713e05eecf569143a24b14a27db4385d58df41bdc165041", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.92 [INFO] [stderr] Compiling unicode-ident v1.0.14 [INFO] [stderr] Compiling libc v0.2.169 [INFO] [stderr] Compiling serde v1.0.217 [INFO] [stderr] Compiling serde_json v1.0.135 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Checking itoa v1.0.14 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking clap_builder v4.5.27 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Checking oorandom v11.1.4 [INFO] [stderr] Checking json-fixer v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/jsonfixer/jsonparser.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | config: config, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/jsonfixer/json_tokenizer.rs:50:39 [INFO] [stdout] | [INFO] [stdout] 50 | Self::Whitespace(s, _) => format!("{}", s), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `s.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/jsonfixer/json_tokenizer.rs:51:43 [INFO] [stdout] | [INFO] [stdout] 51 | Self::UnquotedString(s, _) => format!("{}", s), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `s.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/jsonfixer/json_tokenizer.rs:209:21 [INFO] [stdout] | [INFO] [stdout] 209 | if !next_char.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `next_char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/jsonfixer/json_tokenizer.rs:235:17 [INFO] [stdout] | [INFO] [stdout] 235 | if !ch.is_digit(10) && ch != '.' && ch != 'e' && ch != 'E' && ch != '+' && ch != '-' { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `ch.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/jsonfixer/json_tokenizer.rs:253:12 [INFO] [stdout] | [INFO] [stdout] 253 | if number.chars().last().unwrap() == '.' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `number.ends_with('.')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_last_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/jsonfixer/jsonfixer_config.rs:40:31 [INFO] [stdout] | [INFO] [stdout] 40 | self.space_between && self.preserve == false [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.preserve` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/jsonfixer/jsonfixer_config.rs:44:26 [INFO] [stdout] | [INFO] [stdout] 44 | self.beautify && self.preserve == false [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.preserve` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:50:69 [INFO] [stdout] | [INFO] [stdout] 50 | JsonValue::Number(n) => write!(output, "{}", n).map_err(|e| JsonFixerError::IO(e))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `JsonFixerError::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:71:70 [INFO] [stdout] | [INFO] [stdout] 71 | JsonValue::Space(sp) => write!(output, "{}", sp).map_err(|e| JsonFixerError::IO(e))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `JsonFixerError::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:86:67 [INFO] [stdout] | [INFO] [stdout] 86 | write!(output, "\\u{:04x}", c as u32).map_err(|e| JsonFixerError::IO(e))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `JsonFixerError::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:201:14 [INFO] [stdout] | [INFO] [stdout] 201 | obj: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 201 - obj: &Vec, [INFO] [stdout] 201 + obj: &[JsonEntryValue], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `found` after checking its variant with `is_some` [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:325:27 [INFO] [stdout] | [INFO] [stdout] 324 | if found.is_some() { [INFO] [stdout] | ------------------ help: try: `if let Some() = found` [INFO] [stdout] 325 | let (i, ch) = found.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:277:57 [INFO] [stdout] | [INFO] [stdout] 277 | let entries = self.clean_middle_spaces_and_sort(&obj, config); [INFO] [stdout] | ^^^^ help: change this to: `obj` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:285:42 [INFO] [stdout] | [INFO] [stdout] 285 | for (_i, entry) in entries.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 285 - for (_i, entry) in entries.iter().enumerate() { [INFO] [stdout] 285 + for entry in entries.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:338:14 [INFO] [stdout] | [INFO] [stdout] 338 | obj: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 338 - obj: &Vec, [INFO] [stdout] 338 + obj: &[JsonEntryValue], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/jsonfixer/jsonparser.rs:124:22 [INFO] [stdout] | [INFO] [stdout] 124 | .map_err(|err| JsonFixerError::IO(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `JsonFixerError::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/jsonfixer/jsonparser.rs:192:15 [INFO] [stdout] | [INFO] [stdout] 192 | while !self.current_token.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.current_token.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/jsonfixer/jsonparser.rs:307:15 [INFO] [stdout] | [INFO] [stdout] 307 | while !self.current_token.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.current_token.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/jsonfixer/mod.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | config.space_between = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `jsonfixer::jsonfixer_config::JsonFixerConfig { space_between: true, beautify: false, preserve: false, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/jsonfixer/mod.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | let mut config = JsonFixerConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/jsonfixer/mod.rs:180:9 [INFO] [stdout] | [INFO] [stdout] 180 | config.beautify = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `jsonfixer::jsonfixer_config::JsonFixerConfig { beautify: true, preserve: false, space_between: false, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/jsonfixer/mod.rs:179:9 [INFO] [stdout] | [INFO] [stdout] 179 | let mut config = JsonFixerConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Checking is-terminal v0.4.14 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Compiling quote v1.0.38 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Compiling syn v2.0.96 [INFO] [stderr] Checking clap v4.5.27 [INFO] [stderr] Checking tempfile v3.15.0 [INFO] [stderr] Compiling test-case-core v3.3.1 [INFO] [stderr] Compiling serde_derive v1.0.217 [INFO] [stderr] Compiling test-case-macros v3.3.1 [INFO] [stderr] Checking test-case v3.3.1 [INFO] [stderr] Checking ciborium v0.2.2 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/jsonfixer/jsonparser.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | config: config, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/jsonfixer/json_tokenizer.rs:50:39 [INFO] [stdout] | [INFO] [stdout] 50 | Self::Whitespace(s, _) => format!("{}", s), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `s.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/jsonfixer/json_tokenizer.rs:51:43 [INFO] [stdout] | [INFO] [stdout] 51 | Self::UnquotedString(s, _) => format!("{}", s), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `s.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/jsonfixer/json_tokenizer.rs:209:21 [INFO] [stdout] | [INFO] [stdout] 209 | if !next_char.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `next_char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/jsonfixer/json_tokenizer.rs:235:17 [INFO] [stdout] | [INFO] [stdout] 235 | if !ch.is_digit(10) && ch != '.' && ch != 'e' && ch != 'E' && ch != '+' && ch != '-' { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `ch.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/jsonfixer/json_tokenizer.rs:253:12 [INFO] [stdout] | [INFO] [stdout] 253 | if number.chars().last().unwrap() == '.' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `number.ends_with('.')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_last_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/jsonfixer/jsonfixer_config.rs:40:31 [INFO] [stdout] | [INFO] [stdout] 40 | self.space_between && self.preserve == false [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.preserve` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/jsonfixer/jsonfixer_config.rs:44:26 [INFO] [stdout] | [INFO] [stdout] 44 | self.beautify && self.preserve == false [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.preserve` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:50:69 [INFO] [stdout] | [INFO] [stdout] 50 | JsonValue::Number(n) => write!(output, "{}", n).map_err(|e| JsonFixerError::IO(e))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `JsonFixerError::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:71:70 [INFO] [stdout] | [INFO] [stdout] 71 | JsonValue::Space(sp) => write!(output, "{}", sp).map_err(|e| JsonFixerError::IO(e))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `JsonFixerError::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:86:67 [INFO] [stdout] | [INFO] [stdout] 86 | write!(output, "\\u{:04x}", c as u32).map_err(|e| JsonFixerError::IO(e))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `JsonFixerError::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:201:14 [INFO] [stdout] | [INFO] [stdout] 201 | obj: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 201 - obj: &Vec, [INFO] [stdout] 201 + obj: &[JsonEntryValue], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `found` after checking its variant with `is_some` [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:325:27 [INFO] [stdout] | [INFO] [stdout] 324 | if found.is_some() { [INFO] [stdout] | ------------------ help: try: `if let Some() = found` [INFO] [stdout] 325 | let (i, ch) = found.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:277:57 [INFO] [stdout] | [INFO] [stdout] 277 | let entries = self.clean_middle_spaces_and_sort(&obj, config); [INFO] [stdout] | ^^^^ help: change this to: `obj` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:285:42 [INFO] [stdout] | [INFO] [stdout] 285 | for (_i, entry) in entries.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 285 - for (_i, entry) in entries.iter().enumerate() { [INFO] [stdout] 285 + for entry in entries.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/jsonfixer/jsonformatter.rs:338:14 [INFO] [stdout] | [INFO] [stdout] 338 | obj: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 338 - obj: &Vec, [INFO] [stdout] 338 + obj: &[JsonEntryValue], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/jsonfixer/jsonparser.rs:124:22 [INFO] [stdout] | [INFO] [stdout] 124 | .map_err(|err| JsonFixerError::IO(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `JsonFixerError::IO` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/jsonfixer/jsonparser.rs:192:15 [INFO] [stdout] | [INFO] [stdout] 192 | while !self.current_token.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.current_token.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/jsonfixer/jsonparser.rs:307:15 [INFO] [stdout] | [INFO] [stdout] 307 | while !self.current_token.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.current_token.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/jsonfixer/mod.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | config.space_between = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `jsonfixer::jsonfixer_config::JsonFixerConfig { space_between: true, beautify: false, preserve: false, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/jsonfixer/mod.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | let mut config = JsonFixerConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/jsonfixer/mod.rs:180:9 [INFO] [stdout] | [INFO] [stdout] 180 | config.beautify = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `jsonfixer::jsonfixer_config::JsonFixerConfig { beautify: true, preserve: false, space_between: false, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/jsonfixer/mod.rs:179:9 [INFO] [stdout] | [INFO] [stdout] 179 | let mut config = JsonFixerConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/tests/jsonfixer_tests.rs:250:9 [INFO] [stdout] | [INFO] [stdout] 250 | config.preserve = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `jsonfixer::jsonfixer_config::JsonFixerConfig { preserve: true, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/tests/jsonfixer_tests.rs:249:9 [INFO] [stdout] | [INFO] [stdout] 249 | let mut config = JsonFixerConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/tests/jsonfixer_tests.rs:301:9 [INFO] [stdout] | [INFO] [stdout] 301 | config.preserve = false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `jsonfixer::jsonfixer_config::JsonFixerConfig { preserve: false, sort_keys: false, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/tests/jsonfixer_tests.rs:300:9 [INFO] [stdout] | [INFO] [stdout] 300 | let mut config = JsonFixerConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/tests/jsonfixer_tests.rs:352:9 [INFO] [stdout] | [INFO] [stdout] 352 | config.preserve = false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `jsonfixer::jsonfixer_config::JsonFixerConfig { preserve: false, sort_keys: false, space_between: true, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/tests/jsonfixer_tests.rs:351:9 [INFO] [stdout] | [INFO] [stdout] 351 | let mut config = JsonFixerConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/tests/jsonfixer_tests.rs:417:9 [INFO] [stdout] | [INFO] [stdout] 417 | config.preserve = false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `jsonfixer::jsonfixer_config::JsonFixerConfig { preserve: false, sort_keys: false, space_between: false, beautify: true, indent_size: 4, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/tests/jsonfixer_tests.rs:416:9 [INFO] [stdout] | [INFO] [stdout] 416 | let mut config = JsonFixerConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 17.22s [INFO] running `Command { std: "docker" "inspect" "36066c6c3777c9e4b713e05eecf569143a24b14a27db4385d58df41bdc165041", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "36066c6c3777c9e4b713e05eecf569143a24b14a27db4385d58df41bdc165041", kill_on_drop: false }` [INFO] [stdout] 36066c6c3777c9e4b713e05eecf569143a24b14a27db4385d58df41bdc165041