Skip to content

Commit

Permalink
Change: remove AddLearnerError::Exists, which is not actually used
Browse files Browse the repository at this point in the history
  • Loading branch information
drmingdrmer committed Sep 30, 2022
1 parent 2c06dc4 commit 1bd22ed
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions openraft/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ pub enum AddLearnerError {
#[error(transparent)]
ForwardToLeader(#[from] ForwardToLeader),

#[error("node {0} is already a learner")]
Exists(NodeId),

#[error(transparent)]
Fatal(#[from] Fatal),
}
Expand Down
4 changes: 0 additions & 4 deletions openraft/src/raft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,6 @@ impl<D: AppData, R: AppDataResponse, N: RaftNetwork<D>, S: RaftStorage<D, R>> Ra
AddLearnerError::ForwardToLeader(forward_err) => {
return Err(ClientWriteError::ForwardToLeader(forward_err))
}
AddLearnerError::Exists(node_id) => {
tracing::info!(%node_id, "add learner: already exists");
continue;
}
AddLearnerError::Fatal(f) => return Err(ClientWriteError::Fatal(f)),
}
}
Expand Down

0 comments on commit 1bd22ed

Please sign in to comment.