[INFO] cloning repository https://github.com/SatioO/raft_impl [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/SatioO/raft_impl" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSatioO%2Fraft_impl", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSatioO%2Fraft_impl'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3bd7cc4accb2c6976a6f872b3186aadc5cb7ec46 [INFO] checking SatioO/raft_impl against try#b1f2594eac607c1f051534800237eeedb5590a49 for pr-139493-3 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSatioO%2Fraft_impl" "/workspace/builds/worker-3-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/SatioO/raft_impl [INFO] finished tweaking git repo https://github.com/SatioO/raft_impl [INFO] tweaked toml for git repo https://github.com/SatioO/raft_impl written to /workspace/builds/worker-3-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/SatioO/raft_impl on toolchain b1f2594eac607c1f051534800237eeedb5590a49 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b1f2594eac607c1f051534800237eeedb5590a49" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/SatioO/raft_impl 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" "+b1f2594eac607c1f051534800237eeedb5590a49" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/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:aa71247004a7fa38d13ec170f48f06cdedf5bc50b2a8645e56ed7e992e6fa513" "/opt/rustwide/cargo-home/bin/cargo" "+b1f2594eac607c1f051534800237eeedb5590a49" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e86e2485cf9cc222987d84e93e5cfb250b5b5cdd217bf48e430421cbca5056fe [INFO] running `Command { std: "docker" "start" "-a" "e86e2485cf9cc222987d84e93e5cfb250b5b5cdd217bf48e430421cbca5056fe", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e86e2485cf9cc222987d84e93e5cfb250b5b5cdd217bf48e430421cbca5056fe", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e86e2485cf9cc222987d84e93e5cfb250b5b5cdd217bf48e430421cbca5056fe", kill_on_drop: false }` [INFO] [stdout] e86e2485cf9cc222987d84e93e5cfb250b5b5cdd217bf48e430421cbca5056fe [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/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:aa71247004a7fa38d13ec170f48f06cdedf5bc50b2a8645e56ed7e992e6fa513" "/opt/rustwide/cargo-home/bin/cargo" "+b1f2594eac607c1f051534800237eeedb5590a49" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2f5e0e1e15bd8b428ed415c899a5664106bc48a9698090a3831c5c79cdb4f492 [INFO] running `Command { std: "docker" "start" "-a" "2f5e0e1e15bd8b428ed415c899a5664106bc48a9698090a3831c5c79cdb4f492", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Compiling serde v1.0.203 [INFO] [stderr] Checking futures-core v0.3.30 [INFO] [stderr] Compiling syn v2.0.61 [INFO] [stderr] Checking futures-channel v0.3.30 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking socket2 v0.5.7 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking parking_lot v0.12.2 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking tokio v1.37.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking serde_bytes v0.11.14 [INFO] [stderr] Compiling futures-macro v0.3.30 [INFO] [stderr] Compiling async-trait v0.1.80 [INFO] [stderr] Compiling serde_derive v1.0.203 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Checking raft v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `tokio::sync::OnceCell` [INFO] [stdout] --> src/durio/mod.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use tokio::sync::OnceCell; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `remote_peer::RemotePeer` and `state_machine::StateMachine` [INFO] [stdout] --> src/raft.rs:6:14 [INFO] [stdout] | [INFO] [stdout] 6 | remote::{remote_peer::RemotePeer, remote_raft::RemoteRaft}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 7 | state_machine::StateMachine, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `time::Duration` [INFO] [stdout] --> src/raft.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | time::Duration, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `state_machine::StateMachine` [INFO] [stdout] --> src/main.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 13 | use crate::{raft::Raft, state_machine::StateMachine}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `collections::HashMap` [INFO] [stdout] --> src/main.rs:16:11 [INFO] [stdout] | [INFO] [stdout] 16 | use std::{collections::HashMap, net::SocketAddr}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tokio::sync::OnceCell` [INFO] [stdout] --> src/durio/mod.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use tokio::sync::OnceCell; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `remote_peer::RemotePeer` and `state_machine::StateMachine` [INFO] [stdout] --> src/raft.rs:6:14 [INFO] [stdout] | [INFO] [stdout] 6 | remote::{remote_peer::RemotePeer, remote_raft::RemoteRaft}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 7 | state_machine::StateMachine, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `time::Duration` [INFO] [stdout] --> src/raft.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | time::Duration, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `state_machine::StateMachine` [INFO] [stdout] --> src/main.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 13 | use crate::{raft::Raft, state_machine::StateMachine}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `collections::HashMap` [INFO] [stdout] --> src/main.rs:16:11 [INFO] [stdout] | [INFO] [stdout] 16 | use std::{collections::HashMap, net::SocketAddr}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rf` [INFO] [stdout] --> src/heartbeat.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | let rf = self.inner_state.clone(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_rf` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `peers` [INFO] [stdout] --> src/heartbeat.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | let peers = self.peers.clone(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_peers` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `term` [INFO] [stdout] --> src/kv/storage.rs:28:30 [INFO] [stdout] | [INFO] [stdout] 28 | fn save_term_vote(&self, term: crate::raft_state::Term, voted_for: String) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_term` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `voted_for` [INFO] [stdout] --> src/kv/storage.rs:28:61 [INFO] [stdout] | [INFO] [stdout] 28 | fn save_term_vote(&self, term: crate::raft_state::Term, voted_for: String) { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_voted_for` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry` [INFO] [stdout] --> src/kv/storage.rs:32:32 [INFO] [stdout] | [INFO] [stdout] 32 | fn append_one_entry(&self, entry: &LogEntry) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_entry` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/raft.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | let mut raft_state = RaftState::create(); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `raft` [INFO] [stdout] --> src/main.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | let raft: Raft = Raft::new(servers, 0, storage); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_raft` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Config` is never constructed [INFO] [stdout] --> src/config.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Config { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/config.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl Config { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] 15 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `RaftService` is never used [INFO] [stdout] --> src/durio/mod.rs:7:18 [INFO] [stdout] | [INFO] [stdout] 7 | pub(crate) trait RaftService {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `socket_addr` is never read [INFO] [stdout] --> src/durio/mod.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct LazyRaftServiceClient { [INFO] [stdout] | --------------------- field in this struct [INFO] [stdout] 10 | pub socket_addr: SocketAddr, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `start` and `last_trigger` are never read [INFO] [stdout] --> src/heartbeat.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub(crate) struct HeartbeatsDaemon { [INFO] [stdout] | ---------------- fields in this struct [INFO] [stdout] 15 | start: Instant, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 16 | last_trigger: Arc, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HeartbeatsDaemon` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated constant `HEARTBEAT_MAX_DELAY_MILLIS` is never used [INFO] [stdout] --> src/heartbeat.rs:21:11 [INFO] [stdout] | [INFO] [stdout] 20 | impl HeartbeatsDaemon { [INFO] [stdout] | --------------------- associated constant in this implementation [INFO] [stdout] 21 | const HEARTBEAT_MAX_DELAY_MILLIS: u64 = 30; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `index`, `term`, and `command` are never read [INFO] [stdout] --> src/log_array.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub(crate) struct LogEntry { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 7 | pub index: Index, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 8 | pub term: Term, [INFO] [stdout] | ^^^^ [INFO] [stdout] 9 | command: Option, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LogEntry` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `inner` is never read [INFO] [stdout] --> src/log_array.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 13 | pub(crate) struct LogArray { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] 14 | inner: Vec>, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LogArray` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ClusterMember` is never constructed [INFO] [stdout] --> src/raft.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct ClusterMember { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Leader` and `Candidate` are never constructed [INFO] [stdout] --> src/raft_state.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) enum State { [INFO] [stdout] | ----- variants in this enum [INFO] [stdout] 11 | Leader, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 12 | Follower, [INFO] [stdout] 13 | Candidate, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `State` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `current_term`, `log`, `voted_for`, `commit_index`, `last_applied`, and `state` are never read [INFO] [stdout] --> src/raft_state.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 17 | pub(crate) struct RaftState { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 18 | pub current_term: Term, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 19 | pub log: LogArray, [INFO] [stdout] | ^^^ [INFO] [stdout] 20 | // Who was voted for in the most recent term [INFO] [stdout] 21 | pub voted_for: Option, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub commit_index: Index, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | pub last_applied: Index, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub state: State, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RaftState` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RemotePeer` is never constructed [INFO] [stdout] --> src/remote/remote_peer.rs:1:19 [INFO] [stdout] | [INFO] [stdout] 1 | pub(crate) struct RemotePeer { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `create` is never used [INFO] [stdout] --> src/remote/remote_peer.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 5 | impl RemotePeer { [INFO] [stdout] | ----------------------------------- associated function in this implementation [INFO] [stdout] 6 | pub fn create(unique_id: UniqueID) -> Self { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `request_vote` is never used [INFO] [stdout] --> src/remote/remote_raft.rs:2:14 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait RemoteRaft { [INFO] [stdout] | ---------- method in this trait [INFO] [stdout] 2 | async fn request_vote(&self) -> std::io::Result<()>; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `CommandKind` is never used [INFO] [stdout] --> src/state_machine.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum CommandKind { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `index` and `from_u8` are never used [INFO] [stdout] --> src/state_machine.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 9 | impl CommandKind { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 10 | fn index(&self) -> u8 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | fn from_u8(value: u8) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Command` is never constructed [INFO] [stdout] --> src/state_machine.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | pub struct Command { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/state_machine.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 33 | impl Command { [INFO] [stdout] | ------------ associated function in this implementation [INFO] [stdout] 34 | pub fn new(kind: CommandKind, key: String, value: Option) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `encode_command` is never used [INFO] [stdout] --> src/state_machine.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn encode_command(c: Command) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decode_command` is never used [INFO] [stdout] --> src/state_machine.rs:71:4 [INFO] [stdout] | [INFO] [stdout] 71 | fn decode_command(msg: &[u8]) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `StateMachine` is never constructed [INFO] [stdout] --> src/state_machine.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 103 | pub struct StateMachine { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `apply` is never used [INFO] [stdout] --> src/state_machine.rs:109:8 [INFO] [stdout] | [INFO] [stdout] 108 | impl StateMachine { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] 109 | fn apply(&mut self, cmd: &[u8]) -> Option> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `current_term` and `voted_for` are never used [INFO] [stdout] --> src/storage/mod.rs:23:19 [INFO] [stdout] | [INFO] [stdout] 22 | impl RaftStoredState { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] 23 | pub(crate) fn current_term(&self) -> Term { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | pub(crate) fn voted_for(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `index`, `term`, and `command_bytes` are never used [INFO] [stdout] --> src/storage/mod.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 37 | pub trait RaftLogEntryRef { [INFO] [stdout] | --------------- methods in this trait [INFO] [stdout] 38 | fn index(&self) -> Index; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 39 | fn term(&self) -> Term; [INFO] [stdout] | ^^^^ [INFO] [stdout] 40 | fn command_bytes(&self) -> Vec; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `save_term_vote` and `append_one_entry` are never used [INFO] [stdout] --> src/storage/mod.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 54 | pub trait RaftStoragePersisterTrait: Send + Sync + 'static { [INFO] [stdout] | ------------------------- methods in this trait [INFO] [stdout] 55 | /// Save the term and vote to storage. [INFO] [stdout] 56 | fn save_term_vote(&self, term: Term, voted_for: String); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | fn append_one_entry(&self, entry: &LogEntry); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `RaftStorageMonitorTrait` is never used [INFO] [stdout] --> src/storage/mod.rs:66:11 [INFO] [stdout] | [INFO] [stdout] 66 | pub trait RaftStorageMonitorTrait: Send + 'static { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RaftStoredLogEntry` is never constructed [INFO] [stdout] --> src/storage/mod.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 73 | pub struct RaftStoredLogEntry { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RaftStoredState` is never constructed [INFO] [stdout] --> src/storage/mod.rs:82:12 [INFO] [stdout] | [INFO] [stdout] 82 | pub struct RaftStoredState { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `read_state` is never used [INFO] [stdout] --> src/storage/mod.rs:107:8 [INFO] [stdout] | [INFO] [stdout] 92 | pub trait RaftStorageTrait { [INFO] [stdout] | ---------------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 107 | fn read_state(&self) -> std::io::Result; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rf` [INFO] [stdout] --> src/heartbeat.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | let rf = self.inner_state.clone(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_rf` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `peers` [INFO] [stdout] --> src/heartbeat.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | let peers = self.peers.clone(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_peers` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `term` [INFO] [stdout] --> src/kv/storage.rs:28:30 [INFO] [stdout] | [INFO] [stdout] 28 | fn save_term_vote(&self, term: crate::raft_state::Term, voted_for: String) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_term` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `voted_for` [INFO] [stdout] --> src/kv/storage.rs:28:61 [INFO] [stdout] | [INFO] [stdout] 28 | fn save_term_vote(&self, term: crate::raft_state::Term, voted_for: String) { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_voted_for` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry` [INFO] [stdout] --> src/kv/storage.rs:32:32 [INFO] [stdout] | [INFO] [stdout] 32 | fn append_one_entry(&self, entry: &LogEntry) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_entry` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/raft.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | let mut raft_state = RaftState::create(); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `raft` [INFO] [stdout] --> src/main.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | let raft: Raft = Raft::new(servers, 0, storage); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_raft` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Config` is never constructed [INFO] [stdout] --> src/config.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Config { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/config.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl Config { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] 15 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `RaftService` is never used [INFO] [stdout] --> src/durio/mod.rs:7:18 [INFO] [stdout] | [INFO] [stdout] 7 | pub(crate) trait RaftService {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `socket_addr` is never read [INFO] [stdout] --> src/durio/mod.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct LazyRaftServiceClient { [INFO] [stdout] | --------------------- field in this struct [INFO] [stdout] 10 | pub socket_addr: SocketAddr, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `start` and `last_trigger` are never read [INFO] [stdout] --> src/heartbeat.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub(crate) struct HeartbeatsDaemon { [INFO] [stdout] | ---------------- fields in this struct [INFO] [stdout] 15 | start: Instant, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 16 | last_trigger: Arc, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `HeartbeatsDaemon` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated constant `HEARTBEAT_MAX_DELAY_MILLIS` is never used [INFO] [stdout] --> src/heartbeat.rs:21:11 [INFO] [stdout] | [INFO] [stdout] 20 | impl HeartbeatsDaemon { [INFO] [stdout] | --------------------- associated constant in this implementation [INFO] [stdout] 21 | const HEARTBEAT_MAX_DELAY_MILLIS: u64 = 30; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `index`, `term`, and `command` are never read [INFO] [stdout] --> src/log_array.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub(crate) struct LogEntry { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 7 | pub index: Index, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 8 | pub term: Term, [INFO] [stdout] | ^^^^ [INFO] [stdout] 9 | command: Option, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LogEntry` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `inner` is never read [INFO] [stdout] --> src/log_array.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 13 | pub(crate) struct LogArray { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] 14 | inner: Vec>, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LogArray` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ClusterMember` is never constructed [INFO] [stdout] --> src/raft.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct ClusterMember { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Leader` and `Candidate` are never constructed [INFO] [stdout] --> src/raft_state.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) enum State { [INFO] [stdout] | ----- variants in this enum [INFO] [stdout] 11 | Leader, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 12 | Follower, [INFO] [stdout] 13 | Candidate, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `State` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `current_term`, `log`, `voted_for`, `commit_index`, `last_applied`, and `state` are never read [INFO] [stdout] --> src/raft_state.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 17 | pub(crate) struct RaftState { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 18 | pub current_term: Term, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 19 | pub log: LogArray, [INFO] [stdout] | ^^^ [INFO] [stdout] 20 | // Who was voted for in the most recent term [INFO] [stdout] 21 | pub voted_for: Option, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub commit_index: Index, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | pub last_applied: Index, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub state: State, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RaftState` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RemotePeer` is never constructed [INFO] [stdout] --> src/remote/remote_peer.rs:1:19 [INFO] [stdout] | [INFO] [stdout] 1 | pub(crate) struct RemotePeer { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `create` is never used [INFO] [stdout] --> src/remote/remote_peer.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 5 | impl RemotePeer { [INFO] [stdout] | ----------------------------------- associated function in this implementation [INFO] [stdout] 6 | pub fn create(unique_id: UniqueID) -> Self { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `request_vote` is never used [INFO] [stdout] --> src/remote/remote_raft.rs:2:14 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait RemoteRaft { [INFO] [stdout] | ---------- method in this trait [INFO] [stdout] 2 | async fn request_vote(&self) -> std::io::Result<()>; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `CommandKind` is never used [INFO] [stdout] --> src/state_machine.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum CommandKind { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `index` and `from_u8` are never used [INFO] [stdout] --> src/state_machine.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 9 | impl CommandKind { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 10 | fn index(&self) -> u8 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | fn from_u8(value: u8) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Command` is never constructed [INFO] [stdout] --> src/state_machine.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | pub struct Command { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/state_machine.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 33 | impl Command { [INFO] [stdout] | ------------ associated function in this implementation [INFO] [stdout] 34 | pub fn new(kind: CommandKind, key: String, value: Option) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `encode_command` is never used [INFO] [stdout] --> src/state_machine.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn encode_command(c: Command) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decode_command` is never used [INFO] [stdout] --> src/state_machine.rs:71:4 [INFO] [stdout] | [INFO] [stdout] 71 | fn decode_command(msg: &[u8]) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `StateMachine` is never constructed [INFO] [stdout] --> src/state_machine.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 103 | pub struct StateMachine { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `apply` is never used [INFO] [stdout] --> src/state_machine.rs:109:8 [INFO] [stdout] | [INFO] [stdout] 108 | impl StateMachine { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] 109 | fn apply(&mut self, cmd: &[u8]) -> Option> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `current_term` and `voted_for` are never used [INFO] [stdout] --> src/storage/mod.rs:23:19 [INFO] [stdout] | [INFO] [stdout] 22 | impl RaftStoredState { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] 23 | pub(crate) fn current_term(&self) -> Term { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | pub(crate) fn voted_for(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `index`, `term`, and `command_bytes` are never used [INFO] [stdout] --> src/storage/mod.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 37 | pub trait RaftLogEntryRef { [INFO] [stdout] | --------------- methods in this trait [INFO] [stdout] 38 | fn index(&self) -> Index; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 39 | fn term(&self) -> Term; [INFO] [stdout] | ^^^^ [INFO] [stdout] 40 | fn command_bytes(&self) -> Vec; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `save_term_vote` and `append_one_entry` are never used [INFO] [stdout] --> src/storage/mod.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 54 | pub trait RaftStoragePersisterTrait: Send + Sync + 'static { [INFO] [stdout] | ------------------------- methods in this trait [INFO] [stdout] 55 | /// Save the term and vote to storage. [INFO] [stdout] 56 | fn save_term_vote(&self, term: Term, voted_for: String); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | fn append_one_entry(&self, entry: &LogEntry); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `RaftStorageMonitorTrait` is never used [INFO] [stdout] --> src/storage/mod.rs:66:11 [INFO] [stdout] | [INFO] [stdout] 66 | pub trait RaftStorageMonitorTrait: Send + 'static { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RaftStoredLogEntry` is never constructed [INFO] [stdout] --> src/storage/mod.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 73 | pub struct RaftStoredLogEntry { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RaftStoredState` is never constructed [INFO] [stdout] --> src/storage/mod.rs:82:12 [INFO] [stdout] | [INFO] [stdout] 82 | pub struct RaftStoredState { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `read_state` is never used [INFO] [stdout] --> src/storage/mod.rs:107:8 [INFO] [stdout] | [INFO] [stdout] 92 | pub trait RaftStorageTrait { [INFO] [stdout] | ---------------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 107 | fn read_state(&self) -> std::io::Result; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 20.48s [INFO] running `Command { std: "docker" "inspect" "2f5e0e1e15bd8b428ed415c899a5664106bc48a9698090a3831c5c79cdb4f492", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2f5e0e1e15bd8b428ed415c899a5664106bc48a9698090a3831c5c79cdb4f492", kill_on_drop: false }` [INFO] [stdout] 2f5e0e1e15bd8b428ed415c899a5664106bc48a9698090a3831c5c79cdb4f492