[#1692] metabase: Remove useless count
variable
All checks were successful
Pre-commit hooks / Pre-commit (push) Successful in 1m22s
Vulncheck / Vulncheck (push) Successful in 1m17s
Build / Build Components (push) Successful in 2m12s
Tests and linters / Run gofumpt (push) Successful in 3m15s
Tests and linters / Lint (push) Successful in 3m41s
Tests and linters / Staticcheck (push) Successful in 3m46s
Tests and linters / Tests (push) Successful in 4m10s
Tests and linters / gopls check (push) Successful in 4m23s
OCI image / Build container images (push) Successful in 5m14s
Tests and linters / Tests with -race (push) Successful in 5m15s
All checks were successful
Pre-commit hooks / Pre-commit (push) Successful in 1m22s
Vulncheck / Vulncheck (push) Successful in 1m17s
Build / Build Components (push) Successful in 2m12s
Tests and linters / Run gofumpt (push) Successful in 3m15s
Tests and linters / Lint (push) Successful in 3m41s
Tests and linters / Staticcheck (push) Successful in 3m46s
Tests and linters / Tests (push) Successful in 4m10s
Tests and linters / gopls check (push) Successful in 4m23s
OCI image / Build container images (push) Successful in 5m14s
Tests and linters / Tests with -race (push) Successful in 5m15s
It is always equal to `len(to)`. Change-Id: Id7a4c26e9711216b78f96e6b2511efa0773e3471 Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
a2053870e2
commit
d144abc977
1 changed files with 1 additions and 3 deletions
|
@ -219,7 +219,6 @@ func selectNFromBucket(
|
|||
cursor = new(Cursor)
|
||||
}
|
||||
|
||||
count := len(to)
|
||||
c := bkt.Cursor()
|
||||
k, v := c.First()
|
||||
|
||||
|
@ -231,7 +230,7 @@ func selectNFromBucket(
|
|||
}
|
||||
|
||||
for ; k != nil; k, v = c.Next() {
|
||||
if count >= limit {
|
||||
if len(to) >= limit {
|
||||
break
|
||||
}
|
||||
|
||||
|
@ -275,7 +274,6 @@ func selectNFromBucket(
|
|||
a.SetContainer(cnt)
|
||||
a.SetObject(obj)
|
||||
to = append(to, objectcore.Info{Address: a, Type: objType, IsLinkingObject: isLinkingObj, ECInfo: ecInfo})
|
||||
count++
|
||||
}
|
||||
|
||||
return to, offset, cursor, nil
|
||||
|
|
Loading…
Add table
Reference in a new issue