[INFO] updating cached repository DavideCanton/perudo [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/DavideCanton/perudo [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/DavideCanton/perudo" "work/ex/clippy-test-run/sources/stable/gh/DavideCanton/perudo"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/DavideCanton/perudo'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/DavideCanton/perudo" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/DavideCanton/perudo"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/DavideCanton/perudo'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] a3225a69e856a7b2972f86c20dbdd2a4df7c00be [INFO] sha for GitHub repo DavideCanton/perudo: a3225a69e856a7b2972f86c20dbdd2a4df7c00be [INFO] validating manifest of DavideCanton/perudo 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 DavideCanton/perudo 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 DavideCanton/perudo [INFO] finished frobbing DavideCanton/perudo [INFO] frobbed toml for DavideCanton/perudo written to work/ex/clippy-test-run/sources/stable/gh/DavideCanton/perudo/Cargo.toml [INFO] started frobbing DavideCanton/perudo [INFO] finished frobbing DavideCanton/perudo [INFO] frobbed toml for DavideCanton/perudo written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/DavideCanton/perudo/Cargo.toml [INFO] crate DavideCanton/perudo has a lockfile. skipping [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 DavideCanton/perudo against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/DavideCanton/perudo:/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] f95c2048f4d76f17c7b8921bf082cde138464af9b68851f4868f0c93c95644d9 [INFO] running `"docker" "start" "-a" "f95c2048f4d76f17c7b8921bf082cde138464af9b68851f4868f0c93c95644d9"` [INFO] [stderr] Checking libc v0.2.12 [INFO] [stderr] Checking random v0.10.0 [INFO] [stderr] Checking special v0.7.0 [INFO] [stderr] Checking rand v0.3.14 [INFO] [stderr] Checking probability v0.14.2 [INFO] [stderr] Checking perudo v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/die.rs:25:15 [INFO] [stderr] | [INFO] [stderr] 25 | Die { val: val } [INFO] [stderr] | ^^^^^^^^ help: replace it with: `val` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/die.rs:25:15 [INFO] [stderr] | [INFO] [stderr] 25 | Die { val: val } [INFO] [stderr] | ^^^^^^^^ help: replace it with: `val` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/puntata.rs:15:13 [INFO] [stderr] | [INFO] [stderr] 15 | count: count, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `count` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/puntata.rs:22:13 [INFO] [stderr] | [INFO] [stderr] 22 | count: count, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `count` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/puntata.rs:41:13 [INFO] [stderr] | [INFO] [stderr] 41 | count: count, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `count` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/puntata.rs:15:13 [INFO] [stderr] | [INFO] [stderr] 15 | count: count, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `count` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/puntata.rs:22:13 [INFO] [stderr] | [INFO] [stderr] 22 | count: count, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `count` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/puntata.rs:41:13 [INFO] [stderr] | [INFO] [stderr] 41 | count: count, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `count` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/die.rs:28:26 [INFO] [stderr] | [INFO] [stderr] 28 | pub fn matches_value(&self, n: i32, is_palifico: bool) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/die.rs:36:20 [INFO] [stderr] | [INFO] [stderr] 36 | pub fn is_lama(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/die.rs:40:22 [INFO] [stderr] | [INFO] [stderr] 40 | pub fn get_value(&self) -> i32 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/probs.rs:37:74 [INFO] [stderr] | [INFO] [stderr] 37 | pub fn prob_of(other_dices: i32, my_dices: &[Die], is_palifico: bool, p: &Puntata) -> f64 { [INFO] [stderr] | ^^^^^^^^ help: consider passing by value instead: `Puntata` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/probs.rs:53:9 [INFO] [stderr] | [INFO] [stderr] 53 | (start..other_dices + 1) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(start..=other_dices)` [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/probs.rs:62:36 [INFO] [stderr] | [INFO] [stderr] 62 | least_puntata: &Puntata) [INFO] [stderr] | ^^^^^^^^ help: consider passing by value instead: `Puntata` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/puntata.rs:26:22 [INFO] [stderr] | [INFO] [stderr] 26 | pub fn get_value(&self) -> i32 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/puntata.rs:30:22 [INFO] [stderr] | [INFO] [stderr] 30 | pub fn get_count(&self) -> i32 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/puntata.rs:34:20 [INFO] [stderr] | [INFO] [stderr] 34 | pub fn is_lama(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/puntata.rs:38:23 [INFO] [stderr] | [INFO] [stderr] 38 | pub fn with_count(&self, count: i32) -> Self { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/puntata.rs:57:28 [INFO] [stderr] | [INFO] [stderr] 57 | pub fn least_gt_puntate(p: &Puntata, is_palifico: bool) -> Vec { [INFO] [stderr] | ^^^^^^^^ help: consider passing by value instead: `Puntata` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/puntata.rs:85:44 [INFO] [stderr] | [INFO] [stderr] 85 | pub fn all_gt_puntate(total_dices: i32, p: &Puntata, is_palifico: bool) -> Vec { [INFO] [stderr] | ^^^^^^^^ help: consider passing by value instead: `Puntata` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/puntata.rs:94:18 [INFO] [stderr] | [INFO] [stderr] 94 | for i in p.count..total_dices + 1 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `p.count..=total_dices` [INFO] [stderr] | [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/die.rs:28:26 [INFO] [stderr] | [INFO] [stderr] 28 | pub fn matches_value(&self, n: i32, is_palifico: bool) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/die.rs:36:20 [INFO] [stderr] | [INFO] [stderr] 36 | pub fn is_lama(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/die.rs:40:22 [INFO] [stderr] | [INFO] [stderr] 40 | pub fn get_value(&self) -> i32 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/probs.rs:37:74 [INFO] [stderr] | [INFO] [stderr] 37 | pub fn prob_of(other_dices: i32, my_dices: &[Die], is_palifico: bool, p: &Puntata) -> f64 { [INFO] [stderr] | ^^^^^^^^ help: consider passing by value instead: `Puntata` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/probs.rs:53:9 [INFO] [stderr] | [INFO] [stderr] 53 | (start..other_dices + 1) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(start..=other_dices)` [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/probs.rs:62:36 [INFO] [stderr] | [INFO] [stderr] 62 | least_puntata: &Puntata) [INFO] [stderr] | ^^^^^^^^ help: consider passing by value instead: `Puntata` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/probs.rs:90:18 [INFO] [stderr] | [INFO] [stderr] 90 | let v = *p_map.get(&puntata.with_count(3)).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&p_map[&puntata.with_count(3)]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::get_unwrap)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/puntata.rs:26:22 [INFO] [stderr] | [INFO] [stderr] 26 | pub fn get_value(&self) -> i32 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/puntata.rs:30:22 [INFO] [stderr] | [INFO] [stderr] 30 | pub fn get_count(&self) -> i32 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/puntata.rs:34:20 [INFO] [stderr] | [INFO] [stderr] 34 | pub fn is_lama(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/puntata.rs:38:23 [INFO] [stderr] | [INFO] [stderr] 38 | pub fn with_count(&self, count: i32) -> Self { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/puntata.rs:57:28 [INFO] [stderr] | [INFO] [stderr] 57 | pub fn least_gt_puntate(p: &Puntata, is_palifico: bool) -> Vec { [INFO] [stderr] | ^^^^^^^^ help: consider passing by value instead: `Puntata` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/puntata.rs:85:44 [INFO] [stderr] | [INFO] [stderr] 85 | pub fn all_gt_puntate(total_dices: i32, p: &Puntata, is_palifico: bool) -> Vec { [INFO] [stderr] | ^^^^^^^^ help: consider passing by value instead: `Puntata` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/puntata.rs:94:18 [INFO] [stderr] | [INFO] [stderr] 94 | for i in p.count..total_dices + 1 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `p.count..=total_dices` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 4.74s [INFO] running `"docker" "inspect" "f95c2048f4d76f17c7b8921bf082cde138464af9b68851f4868f0c93c95644d9"` [INFO] running `"docker" "rm" "-f" "f95c2048f4d76f17c7b8921bf082cde138464af9b68851f4868f0c93c95644d9"` [INFO] [stdout] f95c2048f4d76f17c7b8921bf082cde138464af9b68851f4868f0c93c95644d9