implement new logic for RemoveTracksFromQueue

This commit is contained in:
Drew Weymouth
2023-12-22 17:58:36 -08:00
parent cfb8739a61
commit 91951ebfd2
2 changed files with 32 additions and 18 deletions
+3 -3
View File
@@ -78,10 +78,10 @@ func Reversed[T any](ts []T) []T {
return new
}
func ToSet[T comparable](ts []T) map[T]interface{} {
set := make(map[T]interface{}, len(ts))
func ToSet[T comparable](ts []T) map[T]struct{} {
set := make(map[T]struct{}, len(ts))
for _, t := range ts {
set[t] = nil
set[t] = struct{}{}
}
return set
}