mirror of
https://github.com/restic/restic.git
synced 2026-07-16 04:04:53 +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
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user