diff options
author | Jeremy Stribling <strib@alum.mit.edu> | 2017-11-29 13:57:36 -0800 |
---|---|---|
committer | Jeremy Stribling <strib@alum.mit.edu> | 2017-11-29 13:58:41 -0800 |
commit | b18457df6a1f75283d95999fde5c162ba1a19651 (patch) | |
tree | 16080d7fd9fd2af51607f951b43548dc208975fd /storage/memory | |
parent | aa092f5474da3e9c3ff4f40b88849726b645f39f (diff) | |
download | go-git-b18457df6a1f75283d95999fde5c162ba1a19651.tar.gz |
storage: some minor code cleanup
Suggested by mcuadros.
Issue: #669
Diffstat (limited to 'storage/memory')
-rw-r--r-- | storage/memory/storage.go | 3 |
1 files changed, 1 insertions, 2 deletions
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 |