mirror of
https://github.com/restic/restic.git
synced 2025-08-12 11:47:43 +00:00
Remove a few unused variables
This commit is contained in:
@@ -120,7 +120,7 @@ func TestMasterIndex(t *testing.T) {
|
||||
rtest.Assert(t, !found, "Expected no blobs when fetching with a random id")
|
||||
blobs = mIdx.Lookup(restic.NewRandomID(), restic.DataBlob)
|
||||
rtest.Assert(t, blobs == nil, "Expected no blobs when fetching with a random id")
|
||||
size, found = mIdx.LookupSize(restic.NewRandomID(), restic.DataBlob)
|
||||
_, found = mIdx.LookupSize(restic.NewRandomID(), restic.DataBlob)
|
||||
rtest.Assert(t, !found, "Expected no blobs when fetching with a random id")
|
||||
|
||||
// Test Count
|
||||
@@ -172,7 +172,7 @@ func TestMasterMergeFinalIndexes(t *testing.T) {
|
||||
rtest.Equals(t, 1, len(allIndexes))
|
||||
|
||||
blobCount := 0
|
||||
for _ = range mIdx.Each(context.TODO()) {
|
||||
for range mIdx.Each(context.TODO()) {
|
||||
blobCount++
|
||||
}
|
||||
rtest.Equals(t, 2, blobCount)
|
||||
@@ -207,7 +207,7 @@ func TestMasterMergeFinalIndexes(t *testing.T) {
|
||||
rtest.Equals(t, []restic.PackedBlob{blob2}, blobs)
|
||||
|
||||
blobCount = 0
|
||||
for _ = range mIdx.Each(context.TODO()) {
|
||||
for range mIdx.Each(context.TODO()) {
|
||||
blobCount++
|
||||
}
|
||||
rtest.Equals(t, 2, blobCount)
|
||||
|
@@ -11,7 +11,7 @@ import (
|
||||
// one of the workers, it is returned. FinalFunc is always run, regardless of
|
||||
// any other previous errors.
|
||||
func RunWorkers(ctx context.Context, count int, workerFunc func() error, finalFunc func()) error {
|
||||
wg, ctx := errgroup.WithContext(ctx)
|
||||
wg, _ := errgroup.WithContext(ctx)
|
||||
|
||||
// run workers
|
||||
for i := 0; i < count; i++ {
|
||||
|
Reference in New Issue
Block a user