From 18e6f9daa3899318d36b525b068837f49bc2c1cf Mon Sep 17 00:00:00 2001 From: ferhat elmas Date: Wed, 29 Nov 2017 02:24:31 +0100 Subject: all: simplification - no length for map initialization - don't check for boolean/error return - don't format string - use string method of bytes buffer instead of converting bytes to string - use `strings.Contains` instead of `strings.Index` - use `bytes.Equal` instead of `bytes.Compare` --- plumbing/format/objfile/reader.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'plumbing/format/objfile/reader.go') diff --git a/plumbing/format/objfile/reader.go b/plumbing/format/objfile/reader.go index e7e119c..c4467e4 100644 --- a/plumbing/format/objfile/reader.go +++ b/plumbing/format/objfile/reader.go @@ -110,9 +110,5 @@ func (r *Reader) Hash() plumbing.Hash { // Close releases any resources consumed by the Reader. Calling Close does not // close the wrapped io.Reader originally passed to NewReader. func (r *Reader) Close() error { - if err := r.zlib.Close(); err != nil { - return err - } - - return nil + return r.zlib.Close() } -- cgit