From 46ebee948f1da83f100d3098a7fe03bad3bdfe2b Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Wed, 19 Nov 2025 21:41:20 +0100 Subject: [PATCH] stats: use AssociatedBlobSet --- cmd/restic/cmd_stats.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/restic/cmd_stats.go b/cmd/restic/cmd_stats.go index 2b7a74b94..490806e2a 100644 --- a/cmd/restic/cmd_stats.go +++ b/cmd/restic/cmd_stats.go @@ -130,7 +130,7 @@ func runStats(ctx context.Context, opts StatsOptions, gopts global.Options, args stats := &statsContainer{ uniqueFiles: make(map[fileID]struct{}), fileBlobs: make(map[string]restic.IDSet), - blobs: restic.NewBlobSet(), + blobs: repo.NewAssociatedBlobSet(), SnapshotsCount: 0, } @@ -146,7 +146,7 @@ func runStats(ctx context.Context, opts StatsOptions, gopts global.Options, args if opts.countMode == countModeRawData { // the blob handles have been collected, but not yet counted - for blobHandle := range stats.blobs { + for blobHandle := range stats.blobs.Keys() { pbs := repo.LookupBlob(blobHandle.Type, blobHandle.ID) if len(pbs) == 0 { return fmt.Errorf("blob %v not found", blobHandle) @@ -350,7 +350,7 @@ type statsContainer struct { // blobs is used to count individual unique blobs, // independent of references to files - blobs restic.BlobSet + blobs restic.AssociatedBlobSet } // fileID is a 256-bit hash that distinguishes unique files.