1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

lots more generics

This commit is contained in:
Jesse Duffield
2022-03-19 15:36:46 +11:00
parent c7a629c440
commit eda8f4a5d4
19 changed files with 384 additions and 299 deletions

View File

@ -1,6 +1,6 @@
package set
import "github.com/jesseduffield/generics/hashmap"
import "github.com/jesseduffield/generics/maps"
type Set[T comparable] struct {
hashMap map[T]bool
@ -45,5 +45,5 @@ func (s *Set[T]) Includes(value T) bool {
// output slice is not necessarily in the same order that items were added
func (s *Set[T]) ToSlice() []T {
return hashmap.Keys(s.hashMap)
return maps.Keys(s.hashMap)
}