[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/3bd7cc4accb2c6976a6f872b3186aadc5cb7ec46 against master#ab869e094a907cc5d19b4080f22eccaf347f1f95 for pr-129604 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSatioO%2Fraft_impl" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/SatioO/raft_impl on toolchain ab869e094a907cc5d19b4080f22eccaf347f1f95 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ab869e094a907cc5d19b4080f22eccaf347f1f95" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [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-7-tc1/source/Cargo.toml [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" "+ab869e094a907cc5d19b4080f22eccaf347f1f95" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded bincode v1.3.3 [INFO] [stderr] Downloaded miniz_oxide v0.7.3 [INFO] [stderr] Downloaded cc v1.0.98 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+ab869e094a907cc5d19b4080f22eccaf347f1f95" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 52e60a0dac24fabf3f900054d438cf8153770047a4ef8b68ebdf8cf474f808d3 [INFO] running `Command { std: "docker" "start" "-a" "52e60a0dac24fabf3f900054d438cf8153770047a4ef8b68ebdf8cf474f808d3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "52e60a0dac24fabf3f900054d438cf8153770047a4ef8b68ebdf8cf474f808d3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "52e60a0dac24fabf3f900054d438cf8153770047a4ef8b68ebdf8cf474f808d3", kill_on_drop: false }` [INFO] [stdout] 52e60a0dac24fabf3f900054d438cf8153770047a4ef8b68ebdf8cf474f808d3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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" "-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:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+ab869e094a907cc5d19b4080f22eccaf347f1f95" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ca2193574a22b0228e891b7619808c932781e40a487ff3eb9032fac8c7deb13a [INFO] running `Command { std: "docker" "start" "-a" "ca2193574a22b0228e891b7619808c932781e40a487ff3eb9032fac8c7deb13a", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Compiling autocfg v1.3.0 [INFO] [stderr] Compiling proc-macro2 v1.0.82 [INFO] [stderr] Compiling unicode-ident v1.0.12 [INFO] [stderr] Compiling serde v1.0.203 [INFO] [stderr] Compiling parking_lot_core v0.9.10 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Checking pin-project-lite v0.2.14 [INFO] [stderr] Checking futures-core v0.3.30 [INFO] [stderr] Compiling crossbeam-utils v0.8.20 [INFO] [stderr] Checking ppv-lite86 v0.2.17 [INFO] [stderr] Checking futures-task v0.3.30 [INFO] [stderr] Checking bytes v1.6.0 [INFO] [stderr] Checking log v0.4.21 [INFO] [stderr] Checking futures-channel v0.3.30 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking socket2 v0.5.7 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling syn v2.0.61 [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 serde_bytes v0.11.14 [INFO] [stderr] Checking bincode v1.3.3 [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)]` 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)]` 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)]` 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)]` 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: fields `index`, `id`, `address`, `http`, and `cluster` are never read [INFO] [stdout] --> src/config.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Config { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 7 | pub index: usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 8 | pub id: String, [INFO] [stdout] | ^^ [INFO] [stdout] 9 | pub address: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 10 | pub http: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 11 | pub cluster: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Config` 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 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: field `command` is never read [INFO] [stdout] --> src/log_array.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub(crate) struct LogEntry { [INFO] [stdout] | -------- field in this struct [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: fields `id`, `address`, `match_index`, and `next_index` are never read [INFO] [stdout] --> src/raft.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct ClusterMember { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] 17 | pub id: u64, [INFO] [stdout] | ^^ [INFO] [stdout] 18 | pub address: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | pub match_index: Index, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub next_index: Index, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ClusterMember` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [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] = note: `CommandKind` 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 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] = note: `Command` 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 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: fields `db` and `server` are never read [INFO] [stdout] --> src/state_machine.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 103 | pub struct StateMachine { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 104 | pub db: HashMap, [INFO] [stdout] | ^^ [INFO] [stdout] 105 | pub server: usize, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `StateMachine` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [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: fields `index`, `term`, and `command` are never read [INFO] [stdout] --> src/storage/mod.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 73 | pub struct RaftStoredLogEntry { [INFO] [stdout] | ------------------ fields in this struct [INFO] [stdout] 74 | pub index: Index, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 75 | pub term: Term, [INFO] [stdout] | ^^^^ [INFO] [stdout] 76 | pub command: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RaftStoredLogEntry` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `current_term`, `voted_for`, `log`, `snapshot_index`, `snapshot_term`, and `snapshot` are never read [INFO] [stdout] --> src/storage/mod.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 82 | pub struct RaftStoredState { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] 83 | pub current_term: Term, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 84 | pub voted_for: String, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 85 | pub log: Vec, [INFO] [stdout] | ^^^ [INFO] [stdout] 86 | pub snapshot_index: Index, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 87 | pub snapshot_term: Term, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 88 | pub snapshot: Vec, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RaftStoredState` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [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)]` 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: 41 warnings emitted [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)]` 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: fields `index`, `id`, `address`, `http`, and `cluster` are never read [INFO] [stdout] --> src/config.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Config { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 7 | pub index: usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 8 | pub id: String, [INFO] [stdout] | ^^ [INFO] [stdout] 9 | pub address: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 10 | pub http: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 11 | pub cluster: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Config` 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 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: field `command` is never read [INFO] [stdout] --> src/log_array.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub(crate) struct LogEntry { [INFO] [stdout] | -------- field in this struct [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: fields `id`, `address`, `match_index`, and `next_index` are never read [INFO] [stdout] --> src/raft.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct ClusterMember { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] 17 | pub id: u64, [INFO] [stdout] | ^^ [INFO] [stdout] 18 | pub address: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | pub match_index: Index, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub next_index: Index, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ClusterMember` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [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] = note: `CommandKind` 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 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] = note: `Command` 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 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: fields `db` and `server` are never read [INFO] [stdout] --> src/state_machine.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 103 | pub struct StateMachine { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 104 | pub db: HashMap, [INFO] [stdout] | ^^ [INFO] [stdout] 105 | pub server: usize, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `StateMachine` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [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: fields `index`, `term`, and `command` are never read [INFO] [stdout] --> src/storage/mod.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 73 | pub struct RaftStoredLogEntry { [INFO] [stdout] | ------------------ fields in this struct [INFO] [stdout] 74 | pub index: Index, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 75 | pub term: Term, [INFO] [stdout] | ^^^^ [INFO] [stdout] 76 | pub command: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RaftStoredLogEntry` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `current_term`, `voted_for`, `log`, `snapshot_index`, `snapshot_term`, and `snapshot` are never read [INFO] [stdout] --> src/storage/mod.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 82 | pub struct RaftStoredState { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] 83 | pub current_term: Term, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 84 | pub voted_for: String, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 85 | pub log: Vec, [INFO] [stdout] | ^^^ [INFO] [stdout] 86 | pub snapshot_index: Index, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 87 | pub snapshot_term: Term, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 88 | pub snapshot: Vec, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RaftStoredState` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [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: 41 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.30s [INFO] running `Command { std: "docker" "inspect" "ca2193574a22b0228e891b7619808c932781e40a487ff3eb9032fac8c7deb13a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ca2193574a22b0228e891b7619808c932781e40a487ff3eb9032fac8c7deb13a", kill_on_drop: false }` [INFO] [stdout] ca2193574a22b0228e891b7619808c932781e40a487ff3eb9032fac8c7deb13a