Skip to content

Commit 38da3a3

Browse files
committed
log: remove the unnecessary nil check
Signed-off-by: Pavel Kalinnikov <[email protected]>
1 parent 83236d4 commit 38da3a3

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

log.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ package raft
1616

1717
import (
1818
"fmt"
19-
"log"
2019

2120
pb "go.etcd.io/raft/v3/raftpb"
2221
)
@@ -72,9 +71,6 @@ func newLog(storage Storage, logger Logger) *raftLog {
7271
// newLogWithSize returns a log using the given storage and max
7372
// message size.
7473
func newLogWithSize(storage Storage, logger Logger, maxApplyingEntsSize entryEncodingSize) *raftLog {
75-
if storage == nil {
76-
log.Panic("storage must not be nil")
77-
}
7874
firstIndex, err := storage.FirstIndex()
7975
if err != nil {
8076
panic(err) // TODO(bdarnell)

0 commit comments

Comments
 (0)