Skip to content

Commit

Permalink
Merge pull request #134 from icey-yu/fix-map
Browse files Browse the repository at this point in the history
fix: map to slice
  • Loading branch information
icey-yu authored Sep 13, 2024
2 parents 9731939 + 64cb6ab commit 660f3b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/datautil/datautil.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func SliceSetAny[E any, K comparable](es []E, fn func(e E) K) map[K]struct{} {
}

// MapToSlice map to slice
func MapToSlice[E any, K comparable](m map[K]E, fn func(e E) K) []E {
func MapToSlice[E any, K comparable](m map[K]E) []E {
es := make([]E, 0, len(m))
for _, v := range m {
es = append(es, v)
Expand Down

0 comments on commit 660f3b4

Please sign in to comment.