1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

refactor: code improvement, ToString, Contain, Compact

This commit is contained in:
dudaodong
2022-12-01 11:38:25 +08:00
parent a16de97d1d
commit d8ed692651

View File

@@ -61,7 +61,6 @@ func Compact[T comparable](slice []T) []T {
var zero T
result := []T{}
for _, item := range slice {
if item != zero {
result = append(result, item)