[#1692] metabase: Remove useless count variable
All checks were successful
DCO action / DCO (pull_request) Successful in 1m6s
Vulncheck / Vulncheck (pull_request) Successful in 1m24s
Build / Build Components (pull_request) Successful in 2m11s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m11s
Tests and linters / gopls check (pull_request) Successful in 5m26s
Tests and linters / Staticcheck (pull_request) Successful in 5m54s
Tests and linters / Lint (pull_request) Successful in 6m3s
Tests and linters / Run gofumpt (pull_request) Successful in 5m55s
Tests and linters / Tests (pull_request) Successful in 6m46s
Tests and linters / Tests with -race (pull_request) Successful in 6m57s

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 80bd5efe3f
commit 72f0d1e24e
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