Skip to content

Commit

Permalink
log: remove the unnecessary nil check
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
  • Loading branch information
pav-kv committed Feb 6, 2024
1 parent 83236d4 commit 38da3a3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package raft

import (
"fmt"
"log"

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

0 comments on commit 38da3a3

Please sign in to comment.