grid2: simplify removeDuplicatedPins

This commit is contained in:
c9s 2023-07-22 11:45:30 +08:00
parent 461735e043
commit df1067d309
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -55,10 +55,9 @@ func removeDuplicatedPins(pins []Pin) []Pin {
if _, exists := buckets[p.String()]; exists {
continue
} else {
out = append(out, pin)
}
out = append(out, pin)
buckets[p.String()] = struct{}{}
}