Revert 1.21 changes #995

Merged
fyrchik merged 7 commits from fyrchik/frostfs-node:revert-1.21 into master 2024-02-19 15:36:03 +00:00
Showing only changes of commit 4bafe1692d - Show all commits

View file

@ -5,7 +5,6 @@ import (
"errors" "errors"
"fmt" "fmt"
"os" "os"
"slices"
"sort" "sort"
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants" "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants"
@ -447,7 +446,7 @@ func getCIDFilterFunc(cmd *cobra.Command) (func([]byte) bool, error) {
var id cid.ID var id cid.ID
id.SetSHA256(v) id.SetSHA256(v)
idStr := id.EncodeToString() idStr := id.EncodeToString()
_, found := slices.BinarySearch(rawIDs, idStr) n := sort.Search(len(rawIDs), func(i int) bool { return rawIDs[i] >= idStr })
return found return n < len(rawIDs) && rawIDs[n] == idStr
}, nil }, nil
} }