From e5c9c0dd9ff1f42dcdaba7a51919cf43abdb79f9 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 21 Jul 2019 06:24:22 +0200 Subject: *: avoid unnecessary conversions No need to convert these values, they're already of the right type. Signed-off-by: Christian Muehlhaeuser (cherry picked from commit a1d8a7ac8bd0e4aff0f27dbb8bb37b8bd13a1346) --- plumbing/format/commitgraph/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plumbing/format/commitgraph/file.go') diff --git a/plumbing/format/commitgraph/file.go b/plumbing/format/commitgraph/file.go index 175d279..1f82abd 100644 --- a/plumbing/format/commitgraph/file.go +++ b/plumbing/format/commitgraph/file.go @@ -249,7 +249,7 @@ func (fi *fileIndex) getHashesFromIndexes(indexes []int) ([]plumbing.Hash, error // Hashes returns all the hashes that are available in the index func (fi *fileIndex) Hashes() []plumbing.Hash { hashes := make([]plumbing.Hash, fi.fanout[0xff]) - for i := 0; i < int(fi.fanout[0xff]); i++ { + for i := 0; i < fi.fanout[0xff]; i++ { offset := fi.oidLookupOffset + int64(i)*20 if n, err := fi.reader.ReadAt(hashes[i][:], offset); err != nil || n < 20 { return nil -- cgit