Skip to content

Commit f3c3600

Browse files
committed
Fix constraints in KeysForValueFunc()
1 parent 775e671 commit f3c3600

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

maps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func KeysForValue[K, V comparable](m map[K]V, value V) []K {
172172

173173
// KeysForValueFunc returns a slice with keys which have the given value using
174174
// a function to compare values.
175-
func KeysForValueFunc[K, V comparable](m map[K]V, value V, equal func(v1, v2 V) bool) []K {
175+
func KeysForValueFunc[K comparable, V any](m map[K]V, value V, equal func(v1, v2 V) bool) []K {
176176
if m == nil {
177177
return nil
178178
}

0 commit comments

Comments
 (0)