Stop Counters where they're constructed and started

This commit is contained in:
greatroar committed 2020-11-09 13:03:31 +01:00
1 parent ddca699cd2
commit 21b787a4d1
8 files changed
+7 -11

No files matched your search

-4
View File
@@ -51,8 +51,6 @@ type Lister interface {
// New creates a new index for repo from scratch. InvalidFiles contains all IDs
// of files that cannot be listed successfully.
func New(ctx context.Context, repo Lister, ignorePacks restic.IDSet, p *progress.Counter) (idx *Index, invalidFiles restic.IDs, err error) {
defer p.Done()
type Job struct {
PackID restic.ID
Size int64
@@ -191,8 +189,6 @@ func loadIndexJSON(ctx context.Context, repo ListLoader, id restic.ID) (*indexJS
func Load(ctx context.Context, repo ListLoader, p *progress.Counter) (*Index, error) {
debug.Log("loading indexes")
defer p.Done()
supersedes := make(map[restic.ID]restic.IDSet)
results := make(map[restic.ID]map[restic.ID]Pack)