Skip to content

Commit

Permalink
fix: 优化RemoveDuplicateElement()
Browse files Browse the repository at this point in the history
  • Loading branch information
ruishawn committed Feb 6, 2023
1 parent 7f4728c commit 4aacd09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/misc/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func RemoveDuplicateElement[T any](slice []T, elems ...T) []T {
var result []T
slice = append(slice, elems...)
for _, val := range slice {
if IsDuplicate(result, val) == false {
if !IsDuplicate(result, val) {
result = append(result, val)
}
}
Expand Down

0 comments on commit 4aacd09

Please sign in to comment.