aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/bisect
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2025-12-19 12:52:30 +0100
committerAleksandr Nogikh <nogikh@google.com>2025-12-22 02:13:00 +0000
commita83befa0d111a0ba6fac52d763e93c76a2ef94d4 (patch)
tree7d3c28b24229429936a631e8ceb24135856b257d /pkg/bisect
parent8fb7048c5117ccb592deb5e8e4a62027e6d399cf (diff)
all: use any instead of interface{}
Any is the preferred over interface{} now in Go.
Diffstat (limited to 'pkg/bisect')
-rw-r--r--pkg/bisect/bisect.go2
-rw-r--r--pkg/bisect/minimize/slice.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/bisect/bisect.go b/pkg/bisect/bisect.go
index a37436495..adf2bd971 100644
--- a/pkg/bisect/bisect.go
+++ b/pkg/bisect/bisect.go
@@ -1057,7 +1057,7 @@ func (env *env) log(msg string) {
env.logf("%v", msg)
}
-func (env *env) logf(msg string, args ...interface{}) {
+func (env *env) logf(msg string, args ...any) {
if false {
_ = fmt.Sprintf(msg, args...) // enable printf checker
}
diff --git a/pkg/bisect/minimize/slice.go b/pkg/bisect/minimize/slice.go
index d5fbc6c6a..949174ad4 100644
--- a/pkg/bisect/minimize/slice.go
+++ b/pkg/bisect/minimize/slice.go
@@ -24,7 +24,7 @@ type Config[T any] struct {
// anongside the intermediate bisection result (a valid, but not fully minimized slice).
MaxChunks int
// Logf is used for sharing debugging output.
- Logf func(string, ...interface{})
+ Logf func(string, ...any)
}
// Slice() finds a minimal subsequence of slice elements that still gives Pred() == true.
@@ -33,7 +33,7 @@ type Config[T any] struct {
// The expected number of Pred() runs is O(|result|*log2(|elements|)).
func Slice[T any](config Config[T], slice []T) ([]T, error) {
if config.Logf == nil {
- config.Logf = func(string, ...interface{}) {}
+ config.Logf = func(string, ...any) {}
}
ctx := &sliceCtx[T]{
Config: config,