2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-23 03:18:55 +00:00

repository: remove unused packIDToIndex field

This commit is contained in:
Michael Eischer 2022-05-26 16:15:59 +02:00
parent e68c3a4e62
commit c1a8fa4290

View File

@ -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