Przeglądaj źródła

feat:list合并

wangchuanjin 1 rok temu
rodzic
commit
9d9224fc66
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      p/public.go

+ 1 - 1
p/public.go

@@ -347,7 +347,7 @@ func MergeSortList(o, n interface{}, maxPushSize int) *SortList {
 		*nf = append(*nf, v)
 	}
 	sort.Sort(nf)
-	if len(*nf) > maxPushSize {
+	if maxPushSize > 0 && len(*nf) > maxPushSize {
 		*nf = (*nf)[:maxPushSize]
 	}
 	return nf