metabase: Remove useless count variable
Some checks failed
DCO action / DCO (pull_request) Failing after 32s
Vulncheck / Vulncheck (pull_request) Successful in 1m28s
Build / Build Components (pull_request) Successful in 1m51s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m56s
Tests and linters / gopls check (pull_request) Successful in 4m56s
Tests and linters / Run gofumpt (pull_request) Successful in 5m20s
Tests and linters / Staticcheck (pull_request) Successful in 5m40s
Tests and linters / Lint (pull_request) Successful in 5m51s
Tests and linters / Tests (pull_request) Successful in 6m8s
Tests and linters / Tests with -race (pull_request) Successful in 6m27s

It is always equal to `len(to)`.

Change-Id: Id7a4c26e9711216b78f96e6b2511efa0773e3471
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2025-03-20 17:55:31 +03:00
parent f5c39cc76a
commit cb5fc2db3d
Signed by: fyrchik
SSH key fingerprint: SHA256:m/TTwCzjnRkXgnzEx9X92ccxy1CcVeinOgDb3NPWWmg

View file

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