From 8bf37f45fc2a06562988d1e18d4e8d48a4e598f6 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 26 Sep 2019 20:21:09 +0300 Subject: [PATCH] storage: remove impossible error branch from MemoryStore MemoryStore is always successful, so this branch makes no sense. --- pkg/core/storage/memory_store.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/core/storage/memory_store.go b/pkg/core/storage/memory_store.go index 59d74a02a..197202c1f 100644 --- a/pkg/core/storage/memory_store.go +++ b/pkg/core/storage/memory_store.go @@ -59,9 +59,7 @@ func (s *MemoryStore) Put(key, value []byte) error { func (s *MemoryStore) PutBatch(batch Batch) error { b := batch.(*MemoryBatch) for k, v := range b.m { - if err := s.Put(*k, v); err != nil { - return err - } + _ = s.Put(*k, v) } return nil }