[INFO] updating cached repository psiofxt/rust-blockchain [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/psiofxt/rust-blockchain [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/psiofxt/rust-blockchain" "work/ex/clippy-test-run/sources/stable/gh/psiofxt/rust-blockchain"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/psiofxt/rust-blockchain'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/psiofxt/rust-blockchain" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/psiofxt/rust-blockchain"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/psiofxt/rust-blockchain'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 823a087f8d18d373ed32d54cda44e7aeb64d6f77 [INFO] sha for GitHub repo psiofxt/rust-blockchain: 823a087f8d18d373ed32d54cda44e7aeb64d6f77 [INFO] validating manifest of psiofxt/rust-blockchain 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 psiofxt/rust-blockchain 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 psiofxt/rust-blockchain [INFO] finished frobbing psiofxt/rust-blockchain [INFO] frobbed toml for psiofxt/rust-blockchain written to work/ex/clippy-test-run/sources/stable/gh/psiofxt/rust-blockchain/Cargo.toml [INFO] started frobbing psiofxt/rust-blockchain [INFO] finished frobbing psiofxt/rust-blockchain [INFO] frobbed toml for psiofxt/rust-blockchain written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/psiofxt/rust-blockchain/Cargo.toml [INFO] crate psiofxt/rust-blockchain 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 psiofxt/rust-blockchain 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/gh/psiofxt/rust-blockchain:/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] c78d24e464d846647e41d29583b34971308ca9a62623f6bc251e82743c41febd [INFO] running `"docker" "start" "-a" "c78d24e464d846647e41d29583b34971308ca9a62623f6bc251e82743c41febd"` [INFO] [stderr] Compiling unicase v2.2.0 [INFO] [stderr] Checking mio v0.6.15 [INFO] [stderr] Checking want v0.0.4 [INFO] [stderr] Checking tokio-io v0.1.8 [INFO] [stderr] Checking rust-crypto v0.2.36 [INFO] [stderr] Checking serde_json v1.0.26 [INFO] [stderr] Checking syn v0.12.15 [INFO] [stderr] Checking tokio-threadpool v0.1.6 [INFO] [stderr] Checking regex v1.0.5 [INFO] [stderr] Compiling serde_derive v1.0.76 [INFO] [stderr] Checking tokio-codec v0.1.0 [INFO] [stderr] Checking tokio-fs v0.1.3 [INFO] [stderr] Checking mio-uds v0.6.6 [INFO] [stderr] Checking tokio-reactor v0.1.5 [INFO] [stderr] Checking mime v0.3.9 [INFO] [stderr] Checking tokio-udp v0.1.2 [INFO] [stderr] Checking tokio-uds v0.2.1 [INFO] [stderr] Checking tokio-tcp v0.1.1 [INFO] [stderr] Checking env_logger v0.5.13 [INFO] [stderr] Checking tokio v0.1.8 [INFO] [stderr] Checking tokio-core v0.1.17 [INFO] [stderr] Checking tokio-proto v0.1.1 [INFO] [stderr] Checking hyper v0.11.27 [INFO] [stderr] Checking blockchain v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blockchain.rs:76:13 [INFO] [stderr] | [INFO] [stderr] 76 | proof: proof, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `proof` [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/blockchain.rs:77:13 [INFO] [stderr] | [INFO] [stderr] 77 | previous_hash: previous_hash, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `previous_hash` [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/blockchain.rs:87:13 [INFO] [stderr] | [INFO] [stderr] 87 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [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/blockchain.rs:88:13 [INFO] [stderr] | [INFO] [stderr] 88 | recipient: recipient, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `recipient` [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/blockchain.rs:89:13 [INFO] [stderr] | [INFO] [stderr] 89 | amount: amount, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `amount` [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/blockchain.rs:76:13 [INFO] [stderr] | [INFO] [stderr] 76 | proof: proof, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `proof` [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/blockchain.rs:77:13 [INFO] [stderr] | [INFO] [stderr] 77 | previous_hash: previous_hash, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `previous_hash` [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/blockchain.rs:87:13 [INFO] [stderr] | [INFO] [stderr] 87 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [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/blockchain.rs:88:13 [INFO] [stderr] | [INFO] [stderr] 88 | recipient: recipient, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `recipient` [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/blockchain.rs:89:13 [INFO] [stderr] | [INFO] [stderr] 89 | amount: amount, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `amount` [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: long literal lacking separators [INFO] [stderr] --> src/blockchain.rs:70:13 [INFO] [stderr] | [INFO] [stderr] 70 | 1.00000000 [INFO] [stderr] | ^^^^^^^^^^ help: consider: `1.000_000_00` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/proof.rs:21:13 [INFO] [stderr] | [INFO] [stderr] 21 | return true [INFO] [stderr] | ^^^^^^^^^^^ help: remove `return` as shown: `true` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/proof.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | return false [INFO] [stderr] | ^^^^^^^^^^^^ help: remove `return` as shown: `false` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: struct is never constructed: `Node` [INFO] [stderr] --> src/blockchain.rs:26:1 [INFO] [stderr] | [INFO] [stderr] 26 | struct Node { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: function is never used: `make_error_response` [INFO] [stderr] --> src/main.rs:36:1 [INFO] [stderr] | [INFO] [stderr] 36 | fn make_error_response(error_message: &str) -> FutureResult { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: float has excessive precision [INFO] [stderr] --> src/blockchain.rs:70:13 [INFO] [stderr] | [INFO] [stderr] 70 | 1.00000000 [INFO] [stderr] | ^^^^^^^^^^ help: consider changing the type or truncating it to: `1` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::excessive_precision)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stderr] [INFO] [stderr] warning: statement can be reduced [INFO] [stderr] --> src/blockchain.rs:91:9 [INFO] [stderr] | [INFO] [stderr] 91 | &mut self.current_transactions.push(transaction); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.current_transactions.push(transaction);` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_operation)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/proof.rs:5:34 [INFO] [stderr] | [INFO] [stderr] 5 | pub fn proof_of_work(last_proof: &String) -> String { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/proof.rs:13:32 [INFO] [stderr] | [INFO] [stderr] 13 | pub fn valid_proof(last_proof: &String, current_proof: &i32) -> bool { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/proof.rs:13:56 [INFO] [stderr] | [INFO] [stderr] 13 | pub fn valid_proof(last_proof: &String, current_proof: &i32) -> bool { [INFO] [stderr] | ^^^^ help: consider passing by value instead: `i32` [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: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/main.rs:73:21 [INFO] [stderr] | [INFO] [stderr] 73 | let ref new_block: Block = Blockchain::new_block(&mut c); [INFO] [stderr] | ----^^^^^^^^^^^^^---------------------------------------- help: try: `let new_block: &Block = &Blockchain::new_block(&mut c);` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/blockchain.rs:70:13 [INFO] [stderr] | [INFO] [stderr] 70 | 1.00000000 [INFO] [stderr] | ^^^^^^^^^^ help: consider: `1.000_000_00` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/proof.rs:21:13 [INFO] [stderr] | [INFO] [stderr] 21 | return true [INFO] [stderr] | ^^^^^^^^^^^ help: remove `return` as shown: `true` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/proof.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | return false [INFO] [stderr] | ^^^^^^^^^^^^ help: remove `return` as shown: `false` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: struct is never constructed: `Node` [INFO] [stderr] --> src/blockchain.rs:26:1 [INFO] [stderr] | [INFO] [stderr] 26 | struct Node { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: function is never used: `make_error_response` [INFO] [stderr] --> src/main.rs:36:1 [INFO] [stderr] | [INFO] [stderr] 36 | fn make_error_response(error_message: &str) -> FutureResult { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: float has excessive precision [INFO] [stderr] --> src/blockchain.rs:70:13 [INFO] [stderr] | [INFO] [stderr] 70 | 1.00000000 [INFO] [stderr] | ^^^^^^^^^^ help: consider changing the type or truncating it to: `1` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::excessive_precision)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision [INFO] [stderr] [INFO] [stderr] warning: statement can be reduced [INFO] [stderr] --> src/blockchain.rs:91:9 [INFO] [stderr] | [INFO] [stderr] 91 | &mut self.current_transactions.push(transaction); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.current_transactions.push(transaction);` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_operation)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/proof.rs:5:34 [INFO] [stderr] | [INFO] [stderr] 5 | pub fn proof_of_work(last_proof: &String) -> String { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/proof.rs:13:32 [INFO] [stderr] | [INFO] [stderr] 13 | pub fn valid_proof(last_proof: &String, current_proof: &i32) -> bool { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/proof.rs:13:56 [INFO] [stderr] | [INFO] [stderr] 13 | pub fn valid_proof(last_proof: &String, current_proof: &i32) -> bool { [INFO] [stderr] | ^^^^ help: consider passing by value instead: `i32` [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: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/main.rs:73:21 [INFO] [stderr] | [INFO] [stderr] 73 | let ref new_block: Block = Blockchain::new_block(&mut c); [INFO] [stderr] | ----^^^^^^^^^^^^^---------------------------------------- help: try: `let new_block: &Block = &Blockchain::new_block(&mut c);` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 43.23s [INFO] running `"docker" "inspect" "c78d24e464d846647e41d29583b34971308ca9a62623f6bc251e82743c41febd"` [INFO] running `"docker" "rm" "-f" "c78d24e464d846647e41d29583b34971308ca9a62623f6bc251e82743c41febd"` [INFO] [stdout] c78d24e464d846647e41d29583b34971308ca9a62623f6bc251e82743c41febd