Use generics for DepSets
Use Go's generics for DepSets so they don't require a type-specific wrapper and reflection. Test: depsets_test.go Change-Id: I22ba0b7d680d37d2cd05230b0f560d166c4dd20b
This commit is contained in:
@@ -74,10 +74,10 @@ func TestFirstUniqueStrings(t *testing.T) {
|
||||
|
||||
for _, testCase := range firstUniqueStringsTestCases {
|
||||
t.Run("list", func(t *testing.T) {
|
||||
f(t, firstUniqueStringsList, testCase.in, testCase.out)
|
||||
f(t, firstUniqueList[string], testCase.in, testCase.out)
|
||||
})
|
||||
t.Run("map", func(t *testing.T) {
|
||||
f(t, firstUniqueStringsMap, testCase.in, testCase.out)
|
||||
f(t, firstUniqueMap[string], testCase.in, testCase.out)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -604,11 +604,11 @@ func BenchmarkFirstUniqueStrings(b *testing.B) {
|
||||
}{
|
||||
{
|
||||
name: "list",
|
||||
f: firstUniqueStringsList,
|
||||
f: firstUniqueList[string],
|
||||
},
|
||||
{
|
||||
name: "map",
|
||||
f: firstUniqueStringsMap,
|
||||
f: firstUniqueMap[string],
|
||||
},
|
||||
{
|
||||
name: "optimal",
|
||||
|
Reference in New Issue
Block a user