From 78f7082572c688239e2cf0072f9678b3509d69af Mon Sep 17 00:00:00 2001 From: Pavel Kalinnikov Date: Thu, 1 Feb 2024 23:05:14 +0000 Subject: [PATCH] log: remove the unnecessary nil check Signed-off-by: Pavel Kalinnikov --- log.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/log.go b/log.go index 4f96662d..bd7c2feb 100644 --- a/log.go +++ b/log.go @@ -16,7 +16,6 @@ package raft import ( "fmt" - "log" pb "go.etcd.io/raft/v3/raftpb" ) @@ -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)