contrib/raftexample: fix naked return.

This commit is contained in:
johncming 2019-03-20 09:52:12 +08:00
parent 09d0844379
commit 4452d4be22

View File

@ -126,7 +126,7 @@ func (rc *raftNode) saveSnap(snap raftpb.Snapshot) error {
func (rc *raftNode) entriesToApply(ents []raftpb.Entry) (nents []raftpb.Entry) {
if len(ents) == 0 {
return
return ents
}
firstIdx := ents[0].Index
if firstIdx > rc.appliedIndex+1 {