raft: add comment for append in unstableEntries in log.go

This commit is contained in:
Xiang Li 2014-11-24 09:05:40 -08:00
parent 0a46c70f5d
commit 94190286ff

View File

@ -133,6 +133,7 @@ func (l *raftLog) unstableEntries() []pb.Entry {
if len(l.unstableEnts) == 0 {
return nil
}
// copy unstable entries to an empty slice
return append([]pb.Entry{}, l.unstableEnts...)
}