[INFO] cloning repository https://github.com/SecureDataHouse/rust-blockchain [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/SecureDataHouse/rust-blockchain" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSecureDataHouse%2Frust-blockchain", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSecureDataHouse%2Frust-blockchain'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 324addb01c286884bc7039046cb82daa277c4558 [INFO] building SecureDataHouse/rust-blockchain against master#11663cd3bfefef7d34e8f0892c250bf698049392+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSecureDataHouse%2Frust-blockchain" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/SecureDataHouse/rust-blockchain on toolchain 11663cd3bfefef7d34e8f0892c250bf698049392 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/SecureDataHouse/rust-blockchain [INFO] finished tweaking git repo https://github.com/SecureDataHouse/rust-blockchain [INFO] tweaked toml for git repo https://github.com/SecureDataHouse/rust-blockchain written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/SecureDataHouse/rust-blockchain 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" "+11663cd3bfefef7d34e8f0892c250bf698049392" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e5173129cb97975c5a2726a5365a6303ea642e2eac4426e7a901a861f29c4011 [INFO] running `Command { std: "docker" "start" "-a" "e5173129cb97975c5a2726a5365a6303ea642e2eac4426e7a901a861f29c4011", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e5173129cb97975c5a2726a5365a6303ea642e2eac4426e7a901a861f29c4011", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e5173129cb97975c5a2726a5365a6303ea642e2eac4426e7a901a861f29c4011", kill_on_drop: false }` [INFO] [stdout] e5173129cb97975c5a2726a5365a6303ea642e2eac4426e7a901a861f29c4011 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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 -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 750b79f2a2b275b8dd884a57f7b5d70001e8434f2fea1705f872ea80f6cc3b19 [INFO] running `Command { std: "docker" "start" "-a" "750b79f2a2b275b8dd884a57f7b5d70001e8434f2fea1705f872ea80f6cc3b19", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.11 [INFO] [stderr] Compiling num-integer v0.1.42 [INFO] [stderr] Compiling libc v0.2.67 [INFO] [stderr] Compiling crunchy v0.2.2 [INFO] [stderr] Compiling tiny-keccak v2.0.1 [INFO] [stderr] Compiling time v0.1.42 [INFO] [stderr] Compiling num-bigint v0.2.6 [INFO] [stderr] Compiling chrono v0.4.10 [INFO] [stderr] Compiling rust-blockchain v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/basic_prototype.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BigInt` [INFO] [stdout] --> src/proof_of_work.rs:2:27 [INFO] [stdout] | [INFO] [stdout] 2 | use num_bigint::{BigUint, BigInt}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Zero` [INFO] [stdout] --> src/proof_of_work.rs:3:18 [INFO] [stdout] | [INFO] [stdout] 3 | use num_traits::{Zero, One}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/proof_of_work.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `chrono::format::Numeric::Ordinal` [INFO] [stdout] --> src/proof_of_work.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use chrono::format::Numeric::Ordinal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::intrinsics::transmute` [INFO] [stdout] --> src/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::intrinsics::transmute; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/basic_prototype.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let mut prev_block= self.blocks.get(self.blocks.len()-1); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Block` is never constructed [INFO] [stdout] --> src/basic_prototype.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct Block { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Block` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `set_hash`, `new_block`, and `new_genesis_block` are never used [INFO] [stdout] --> src/basic_prototype.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl Block { [INFO] [stdout] | ---------- associated functions in this implementation [INFO] [stdout] 19 | pub fn set_hash(block: &mut Block) -> &Block { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn new_block(data: String, prev_block_hash: [u8; 32]) -> Block { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn new_genesis_block() -> Block { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Blockchain` is never constructed [INFO] [stdout] --> src/basic_prototype.rs:66:12 [INFO] [stdout] | [INFO] [stdout] 66 | pub struct Blockchain { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `add_block` and `new_blockchain` are never used [INFO] [stdout] --> src/basic_prototype.rs:71:12 [INFO] [stdout] | [INFO] [stdout] 70 | impl Blockchain { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] 71 | pub fn add_block(&mut self, data: String) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | pub fn new_blockchain(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TARGET_BITS` is never used [INFO] [stdout] --> src/proof_of_work.rs:11:7 [INFO] [stdout] | [INFO] [stdout] 11 | const TARGET_BITS: u32 = 24; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MAX_NONCE` is never used [INFO] [stdout] --> src/proof_of_work.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | const MAX_NONCE: i64 = i64::max_value(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ProofOfWork` is never constructed [INFO] [stdout] --> src/proof_of_work.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct ProofOfWork { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `new_proof_of_work`, `prepare_data`, `run`, and `validate` are never used [INFO] [stdout] --> src/proof_of_work.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl ProofOfWork { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] 20 | pub fn new_proof_of_work(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | pub fn prepare_data(&self, nonce: i64) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn run(&self) -> (i64, [u8; 32]) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | pub fn validate(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/basic_prototype.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BigInt` [INFO] [stdout] --> src/proof_of_work.rs:2:27 [INFO] [stdout] | [INFO] [stdout] 2 | use num_bigint::{BigUint, BigInt}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Zero` [INFO] [stdout] --> src/proof_of_work.rs:3:18 [INFO] [stdout] | [INFO] [stdout] 3 | use num_traits::{Zero, One}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/proof_of_work.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `chrono::format::Numeric::Ordinal` [INFO] [stdout] --> src/proof_of_work.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use chrono::format::Numeric::Ordinal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/basic_prototype.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let mut prev_block= self.blocks.get(self.blocks.len()-1); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.63s [INFO] running `Command { std: "docker" "inspect" "750b79f2a2b275b8dd884a57f7b5d70001e8434f2fea1705f872ea80f6cc3b19", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "750b79f2a2b275b8dd884a57f7b5d70001e8434f2fea1705f872ea80f6cc3b19", kill_on_drop: false }` [INFO] [stdout] 750b79f2a2b275b8dd884a57f7b5d70001e8434f2fea1705f872ea80f6cc3b19 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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 -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 9c362d3e59dfec1afaf30a657eea5fc3e6f48b53ee5f7f46a3a0763a97cab89b [INFO] running `Command { std: "docker" "start" "-a" "9c362d3e59dfec1afaf30a657eea5fc3e6f48b53ee5f7f46a3a0763a97cab89b", kill_on_drop: false }` [INFO] [stderr] Compiling rust-blockchain v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/basic_prototype.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BigInt` [INFO] [stdout] --> src/proof_of_work.rs:2:27 [INFO] [stdout] | [INFO] [stdout] 2 | use num_bigint::{BigUint, BigInt}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Zero` [INFO] [stdout] --> src/proof_of_work.rs:3:18 [INFO] [stdout] | [INFO] [stdout] 3 | use num_traits::{Zero, One}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/proof_of_work.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `chrono::format::Numeric::Ordinal` [INFO] [stdout] --> src/proof_of_work.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use chrono::format::Numeric::Ordinal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::intrinsics::transmute` [INFO] [stdout] --> src/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::intrinsics::transmute; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/basic_prototype.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let mut prev_block= self.blocks.get(self.blocks.len()-1); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Block` is never constructed [INFO] [stdout] --> src/basic_prototype.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct Block { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Block` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `set_hash`, `new_block`, and `new_genesis_block` are never used [INFO] [stdout] --> src/basic_prototype.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl Block { [INFO] [stdout] | ---------- associated functions in this implementation [INFO] [stdout] 19 | pub fn set_hash(block: &mut Block) -> &Block { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn new_block(data: String, prev_block_hash: [u8; 32]) -> Block { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn new_genesis_block() -> Block { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Blockchain` is never constructed [INFO] [stdout] --> src/basic_prototype.rs:66:12 [INFO] [stdout] | [INFO] [stdout] 66 | pub struct Blockchain { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `add_block` and `new_blockchain` are never used [INFO] [stdout] --> src/basic_prototype.rs:71:12 [INFO] [stdout] | [INFO] [stdout] 70 | impl Blockchain { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] 71 | pub fn add_block(&mut self, data: String) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | pub fn new_blockchain(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TARGET_BITS` is never used [INFO] [stdout] --> src/proof_of_work.rs:11:7 [INFO] [stdout] | [INFO] [stdout] 11 | const TARGET_BITS: u32 = 24; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MAX_NONCE` is never used [INFO] [stdout] --> src/proof_of_work.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | const MAX_NONCE: i64 = i64::max_value(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ProofOfWork` is never constructed [INFO] [stdout] --> src/proof_of_work.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct ProofOfWork { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `new_proof_of_work`, `prepare_data`, `run`, and `validate` are never used [INFO] [stdout] --> src/proof_of_work.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl ProofOfWork { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] 20 | pub fn new_proof_of_work(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | pub fn prepare_data(&self, nonce: i64) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn run(&self) -> (i64, [u8; 32]) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | pub fn validate(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/basic_prototype.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BigInt` [INFO] [stdout] --> src/proof_of_work.rs:2:27 [INFO] [stdout] | [INFO] [stdout] 2 | use num_bigint::{BigUint, BigInt}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Zero` [INFO] [stdout] --> src/proof_of_work.rs:3:18 [INFO] [stdout] | [INFO] [stdout] 3 | use num_traits::{Zero, One}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/proof_of_work.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `chrono::format::Numeric::Ordinal` [INFO] [stdout] --> src/proof_of_work.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use chrono::format::Numeric::Ordinal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/basic_prototype.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/basic_prototype.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let mut prev_block= self.blocks.get(self.blocks.len()-1); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BigInt` [INFO] [stdout] --> src/proof_of_work.rs:2:27 [INFO] [stdout] | [INFO] [stdout] 2 | use num_bigint::{BigUint, BigInt}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Zero` [INFO] [stdout] --> src/proof_of_work.rs:3:18 [INFO] [stdout] | [INFO] [stdout] 3 | use num_traits::{Zero, One}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/proof_of_work.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `chrono::format::Numeric::Ordinal` [INFO] [stdout] --> src/proof_of_work.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use chrono::format::Numeric::Ordinal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::intrinsics::transmute` [INFO] [stdout] --> src/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::intrinsics::transmute; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/basic_prototype.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let mut prev_block= self.blocks.get(self.blocks.len()-1); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Block` is never constructed [INFO] [stdout] --> src/basic_prototype.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct Block { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Block` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `set_hash`, `new_block`, and `new_genesis_block` are never used [INFO] [stdout] --> src/basic_prototype.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl Block { [INFO] [stdout] | ---------- associated functions in this implementation [INFO] [stdout] 19 | pub fn set_hash(block: &mut Block) -> &Block { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn new_block(data: String, prev_block_hash: [u8; 32]) -> Block { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn new_genesis_block() -> Block { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Blockchain` is never constructed [INFO] [stdout] --> src/basic_prototype.rs:66:12 [INFO] [stdout] | [INFO] [stdout] 66 | pub struct Blockchain { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `add_block` and `new_blockchain` are never used [INFO] [stdout] --> src/basic_prototype.rs:71:12 [INFO] [stdout] | [INFO] [stdout] 70 | impl Blockchain { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] 71 | pub fn add_block(&mut self, data: String) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | pub fn new_blockchain(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TARGET_BITS` is never used [INFO] [stdout] --> src/proof_of_work.rs:11:7 [INFO] [stdout] | [INFO] [stdout] 11 | const TARGET_BITS: u32 = 24; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MAX_NONCE` is never used [INFO] [stdout] --> src/proof_of_work.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | const MAX_NONCE: i64 = i64::max_value(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ProofOfWork` is never constructed [INFO] [stdout] --> src/proof_of_work.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct ProofOfWork { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `new_proof_of_work`, `prepare_data`, `run`, and `validate` are never used [INFO] [stdout] --> src/proof_of_work.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl ProofOfWork { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] 20 | pub fn new_proof_of_work(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | pub fn prepare_data(&self, nonce: i64) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn run(&self) -> (i64, [u8; 32]) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | pub fn validate(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.44s [INFO] running `Command { std: "docker" "inspect" "9c362d3e59dfec1afaf30a657eea5fc3e6f48b53ee5f7f46a3a0763a97cab89b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9c362d3e59dfec1afaf30a657eea5fc3e6f48b53ee5f7f46a3a0763a97cab89b", kill_on_drop: false }` [INFO] [stdout] 9c362d3e59dfec1afaf30a657eea5fc3e6f48b53ee5f7f46a3a0763a97cab89b