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:
greatroar
2023-01-30 22:01:01 +01:00
committed by Michael Eischer
parent febb32b5b4
commit d129baba7a
7 changed files with 20 additions and 25 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ func runCat(ctx context.Context, gopts GlobalOptions, args []string) error {
Println(string(buf))
return nil
case "index":
buf, err := repo.LoadUnpacked(ctx, restic.IndexFile, id, nil)
buf, err := repo.LoadUnpacked(ctx, restic.IndexFile, id)
if err != nil {
return err
}