[INFO] crate rupantor 0.2.0 is already in cache [INFO] extracting crate rupantor 0.2.0 into work/ex/clippy-test-run/sources/stable/reg/rupantor/0.2.0 [INFO] extracting crate rupantor 0.2.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/rupantor/0.2.0 [INFO] validating manifest of rupantor-0.2.0 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of rupantor-0.2.0 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing rupantor-0.2.0 [INFO] finished frobbing rupantor-0.2.0 [INFO] frobbed toml for rupantor-0.2.0 written to work/ex/clippy-test-run/sources/stable/reg/rupantor/0.2.0/Cargo.toml [INFO] started frobbing rupantor-0.2.0 [INFO] finished frobbing rupantor-0.2.0 [INFO] frobbed toml for rupantor-0.2.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/rupantor/0.2.0/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting rupantor-0.2.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-0/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/rupantor/0.2.0:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] c821d479e3ae8c264d64e77eb7eb96e548b118dbd15d46b4f38df5551861a370 [INFO] running `"docker" "start" "-a" "c821d479e3ae8c264d64e77eb7eb96e548b118dbd15d46b4f38df5551861a370"` [INFO] [stderr] Checking stringplus v0.1.0 [INFO] [stderr] Checking rupantor v0.2.0 (/opt/crater/workdir) [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/parser.rs:120:49 [INFO] [stderr] | [INFO] [stderr] 120 | / let mut e: i32 = 0; [INFO] [stderr] 121 | | if _type == "suffix" { [INFO] [stderr] 122 | | s = end; [INFO] [stderr] 123 | | e = end + value.len() as i32; [INFO] [stderr] ... | [INFO] [stderr] 127 | | e = start; [INFO] [stderr] 128 | | } [INFO] [stderr] | |_________________________________________________^ help: it is more idiomatic to write: `let e = if _type == "suffix" { ..; end + value.len() as i32 } else { ..; start };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/parser.rs:172:34 [INFO] [stderr] | [INFO] [stderr] 172 | output += &fixed[cur..cur + 1]; [INFO] [stderr] | ^^^^^^^^^^^^ help: use: `cur..=cur` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: you should consider adding a `Default` implementation for `avro::AvroPhonetic` [INFO] [stderr] --> src/avro.rs:12:5 [INFO] [stderr] | [INFO] [stderr] 12 | / pub fn new() -> AvroPhonetic { [INFO] [stderr] 13 | | let rule = serde_json::from_str(include_str!("AvroPhonetic.json")).unwrap(); [INFO] [stderr] 14 | | AvroPhonetic { parser: PhoneticParser::new(&rule) } [INFO] [stderr] 15 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 10 | impl Default for avro::AvroPhonetic { [INFO] [stderr] 11 | fn default() -> Self { [INFO] [stderr] 12 | Self::new() [INFO] [stderr] 13 | } [INFO] [stderr] 14 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/parser.rs:120:49 [INFO] [stderr] | [INFO] [stderr] 120 | / let mut e: i32 = 0; [INFO] [stderr] 121 | | if _type == "suffix" { [INFO] [stderr] 122 | | s = end; [INFO] [stderr] 123 | | e = end + value.len() as i32; [INFO] [stderr] ... | [INFO] [stderr] 127 | | e = start; [INFO] [stderr] 128 | | } [INFO] [stderr] | |_________________________________________________^ help: it is more idiomatic to write: `let e = if _type == "suffix" { ..; end + value.len() as i32 } else { ..; start };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/parser.rs:172:34 [INFO] [stderr] | [INFO] [stderr] 172 | output += &fixed[cur..cur + 1]; [INFO] [stderr] | ^^^^^^^^^^^^ help: use: `cur..=cur` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 412 [INFO] [stderr] --> src/parser.rs:240:5 [INFO] [stderr] | [INFO] [stderr] 240 | / fn test_basic() { [INFO] [stderr] 241 | | let json = serde_json::from_str(include_str!("AvroPhonetic.json")).unwrap(); [INFO] [stderr] 242 | | let parser = PhoneticParser::new(&json); [INFO] [stderr] 243 | | [INFO] [stderr] ... | [INFO] [stderr] 654 | | assert_eq!(parser.convert("bdh"), "ব্ধ"); [INFO] [stderr] 655 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: you should consider adding a `Default` implementation for `avro::AvroPhonetic` [INFO] [stderr] --> src/avro.rs:12:5 [INFO] [stderr] | [INFO] [stderr] 12 | / pub fn new() -> AvroPhonetic { [INFO] [stderr] 13 | | let rule = serde_json::from_str(include_str!("AvroPhonetic.json")).unwrap(); [INFO] [stderr] 14 | | AvroPhonetic { parser: PhoneticParser::new(&rule) } [INFO] [stderr] 15 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 10 | impl Default for avro::AvroPhonetic { [INFO] [stderr] 11 | fn default() -> Self { [INFO] [stderr] 12 | Self::new() [INFO] [stderr] 13 | } [INFO] [stderr] 14 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 4.48s [INFO] running `"docker" "inspect" "c821d479e3ae8c264d64e77eb7eb96e548b118dbd15d46b4f38df5551861a370"` [INFO] running `"docker" "rm" "-f" "c821d479e3ae8c264d64e77eb7eb96e548b118dbd15d46b4f38df5551861a370"` [INFO] [stdout] c821d479e3ae8c264d64e77eb7eb96e548b118dbd15d46b4f38df5551861a370