Skip to content

Commit 87818b7

Browse files
committed
Make raft::Driver::execute() non-async and private.
1 parent afb320a commit 87818b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/raft/state.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl Driver {
8282
pub async fn drive(mut self, mut state: Box<dyn State>) -> Result<()> {
8383
debug!("Starting state machine driver at applied index {}", state.get_applied_index());
8484
while let Some(instruction) = self.state_rx.next().await {
85-
if let Err(error) = self.execute(instruction, &mut *state).await {
85+
if let Err(error) = self.execute(instruction, &mut *state) {
8686
error!("Halting state machine due to error: {}", error);
8787
return Err(error);
8888
}
@@ -121,7 +121,7 @@ impl Driver {
121121
}
122122

123123
/// Executes a state machine instruction.
124-
pub async fn execute(&mut self, i: Instruction, state: &mut dyn State) -> Result<()> {
124+
fn execute(&mut self, i: Instruction, state: &mut dyn State) -> Result<()> {
125125
debug!("Executing {:?}", i);
126126
match i {
127127
Instruction::Abort => {

0 commit comments

Comments
 (0)