mirror of
https://github.com/restic/restic.git
synced 2025-08-23 09:47:42 +00:00
repository: Reuse buffers in Repository.LoadUnpacked
This method had a buffer argument, but that was nil at all call sites. That's removed, and instead LoadUnpacked now reuses whatever it allocates inside its retry loop.
This commit is contained in:

committed by
Michael Eischer

parent
febb32b5b4
commit
d129baba7a
@@ -24,7 +24,7 @@ func ForAllIndexes(ctx context.Context, repo restic.Repository,
|
||||
var idx *Index
|
||||
oldFormat := false
|
||||
|
||||
buf, err := repo.LoadUnpacked(ctx, restic.IndexFile, id, nil)
|
||||
buf, err := repo.LoadUnpacked(ctx, restic.IndexFile, id)
|
||||
if err == nil {
|
||||
idx, oldFormat, err = DecodeIndex(buf, id)
|
||||
}
|
||||
|
Reference in New Issue
Block a user