From 38da3a3dae3e3940375858524bfb7fc91ea985ec 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)