diff --git a/internal/repository/index.go b/internal/repository/index.go index fd7ac1b94..6676d0635 100644 --- a/internal/repository/index.go +++ b/internal/repository/index.go @@ -46,8 +46,6 @@ type Index struct { byType [restic.NumBlobTypes]indexMap packs restic.IDs mixedPacks restic.IDSet - // only used by Store, StorePacks does not check for already saved packIDs - packIDToIndex map[restic.ID]int final bool // set to true for all indexes read from the backend ("finalized") ids restic.IDs // set to the IDs of the contained finalized indexes @@ -58,9 +56,8 @@ type Index struct { // NewIndex returns a new index. func NewIndex() *Index { return &Index{ - packIDToIndex: make(map[restic.ID]int), - mixedPacks: restic.NewIDSet(), - created: time.Now(), + mixedPacks: restic.NewIDSet(), + created: time.Now(), } } @@ -402,8 +399,6 @@ func (idx *Index) Finalize() { defer idx.m.Unlock() idx.final = true - // clear packIDToIndex as no more elements will be added - idx.packIDToIndex = nil } // IDs returns the IDs of the index, if available. If the index is not yet