From b18457df6a1f75283d95999fde5c162ba1a19651 Mon Sep 17 00:00:00 2001 From: Jeremy Stribling Date: Wed, 29 Nov 2017 13:57:36 -0800 Subject: storage: some minor code cleanup Suggested by mcuadros. Issue: #669 --- storage/memory/storage.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'storage/memory/storage.go') diff --git a/storage/memory/storage.go b/storage/memory/storage.go index c76d163..0f66f1e 100644 --- a/storage/memory/storage.go +++ b/storage/memory/storage.go @@ -116,8 +116,7 @@ func (o *ObjectStorage) SetEncodedObject(obj plumbing.EncodedObject) (plumbing.H } func (o *ObjectStorage) HasEncodedObject(h plumbing.Hash) (err error) { - _, ok := o.Objects[h] - if !ok { + if _, ok := o.Objects[h]; !ok { return plumbing.ErrObjectNotFound } return nil -- cgit