Skip to content
Snippets Groups Projects
Commit 803d2a9a authored by Yaroslav Dynnikov's avatar Yaroslav Dynnikov
Browse files

chore: replace "if" with "match"

parent 3c9bf916
No related branches found
No related tags found
1 merge request!157refactor: cut raft_main loop into pieces
Pipeline #7420 passed
......@@ -332,10 +332,19 @@ fn handle_committed_entries(
}
};
if entry.entry_type == raft::EntryType::EntryNormal {
handle_committed_normal_entry(entry, notifications, joint_state_latch)
} else {
handle_committed_conf_change(entry, raw_node, pool, joint_state_latch, config_changed)
match entry.entry_type {
raft::EntryType::EntryNormal => {
handle_committed_normal_entry(entry, notifications, joint_state_latch)
}
raft::EntryType::EntryConfChange | raft::EntryType::EntryConfChangeV2 => {
handle_committed_conf_change(
entry,
raw_node,
pool,
joint_state_latch,
config_changed,
)
}
}
}
......
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