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 <[email protected]>
  • Loading branch information
pav-kv committed Feb 1, 2024
1 parent a4d526e commit 6753d79
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ package raft

import (
"fmt"
"log"

pb "go.etcd.io/raft/v3/raftpb"
)

Expand Down Expand Up @@ -72,9 +70,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 6753d79

Please sign in to comment.