Skip to content
Snippets Groups Projects
Commit c693710f authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

chore: fix warnings

parent 0a1c150f
No related branches found
No related tags found
3 merge requests!163Feat/voter switchover,!162Refactor/events and more,!158Refactor join loop (v2)
Pipeline #7491 failed
......@@ -266,14 +266,6 @@ impl Entry {
None => None,
}
}
/// Returns the iterator over contained `Vec<Peer>` if it's an `EntryConfChange`.
fn iter_peers(&self) -> std::slice::Iter<'_, Peer> {
match &self.context {
Some(EntryContext::ConfChange(v)) => v.peers.iter(),
_ => (&[]).iter(),
}
}
}
impl EntryContext {
......@@ -474,6 +466,7 @@ pub struct SetActiveRequest {
impl AsTuple for SetActiveRequest {}
impl SetActiveRequest {
#[allow(dead_code)]
#[inline]
pub fn activate(instance_id: impl Into<String>, cluster_id: impl Into<String>) -> Self {
Self {
......
......@@ -14,7 +14,6 @@ use ::tarantool::fiber;
use ::tarantool::proc;
use ::tarantool::tlua;
use ::tarantool::transaction::start_transaction;
use std::any::type_name;
use std::any::Any;
use std::cell::RefCell;
use std::collections::HashMap;
......
......@@ -212,6 +212,7 @@ impl Storage {
Storage::raft_state("raft_id")
}
#[allow(dead_code)]
pub fn instance_id() -> Result<Option<String>, StorageError> {
Storage::raft_state("instance_id")
}
......@@ -299,6 +300,7 @@ impl Storage {
Ok(())
}
#[allow(dead_code)]
pub fn delete_peer(raft_id: u64) -> Result<(), StorageError> {
Storage::space(RAFT_GROUP)?
.delete(&[raft_id])
......
......@@ -106,7 +106,7 @@ impl Topology {
instance_id,
instance_uuid,
raft_id,
peer_address: advertise.into(),
peer_address: advertise,
replicaset_id,
replicaset_uuid,
commit_index: INVALID_INDEX,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment