mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-05 00:59:19 +02:00
Bump generics dependency
This commit is contained in:
4
vendor/github.com/jesseduffield/generics/maps/maps.go
generated
vendored
4
vendor/github.com/jesseduffield/generics/maps/maps.go
generated
vendored
@ -19,7 +19,7 @@ func Values[Key comparable, Value any](m map[Key]Value) []Value {
|
||||
func TransformValues[Key comparable, Value any, NewValue any](
|
||||
m map[Key]Value, fn func(Value) NewValue,
|
||||
) map[Key]NewValue {
|
||||
output := make(map[Key]NewValue)
|
||||
output := make(map[Key]NewValue, len(m))
|
||||
for key, value := range m {
|
||||
output[key] = fn(value)
|
||||
}
|
||||
@ -27,7 +27,7 @@ func TransformValues[Key comparable, Value any, NewValue any](
|
||||
}
|
||||
|
||||
func TransformKeys[Key comparable, Value any, NewKey comparable](m map[Key]Value, fn func(Key) NewKey) map[NewKey]Value {
|
||||
output := make(map[NewKey]Value)
|
||||
output := make(map[NewKey]Value, len(m))
|
||||
for key, value := range m {
|
||||
output[fn(key)] = value
|
||||
}
|
||||
|
Reference in New Issue
Block a user