Files
sqlite3/internal/util/set.go

13 lines
167 B
Go
Raw Permalink Normal View History

2024-09-21 11:40:16 +01:00
package util
type Set[E comparable] map[E]struct{}
func (s Set[E]) Add(v E) {
s[v] = struct{}{}
}
func (s Set[E]) Contains(v E) bool {
_, ok := s[v]
return ok
}