mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-25 13:12:11 +02:00
multi: remove x/exp/maps dependency
This commit is contained in:
@@ -2,13 +2,13 @@ package fn
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"golang.org/x/exp/maps"
|
||||
"maps"
|
||||
"slices"
|
||||
)
|
||||
|
||||
// KeySet converts a map into a Set containing the keys of the map.
|
||||
func KeySet[K comparable, V any](m map[K]V) Set[K] {
|
||||
return NewSet(maps.Keys(m)...)
|
||||
return NewSet(slices.Collect(maps.Keys(m))...)
|
||||
}
|
||||
|
||||
// NewSubMapIntersect returns a sub-map of `m` containing only the keys found in
|
||||
|
Reference in New Issue
Block a user