package gio

import "slices"

// SlicesRD Slices Remove Duplicates 切片去重
func SlicesRD[T comparable](old []T) []T {
	r := make([]T, 0, len(old))
	for _, v := range old {
		if !slices.Contains(r, v) {
			r = append(r, v)
		}
	}
	return r
}
