From a2ac2bf94ec475b689d591bb001b3558f38cf679 Mon Sep 17 00:00:00 2001 From: fantasticbin Date: Wed, 13 Nov 2024 15:29:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=AD=E4=BB=A3=E5=99=A8=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E9=9B=86=E5=90=88=E5=A2=9E=E5=8A=A0=E5=88=87=E7=89=87=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iterator/set.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iterator/set.go b/iterator/set.go index 9280342..6f1ba9d 100644 --- a/iterator/set.go +++ b/iterator/set.go @@ -24,14 +24,14 @@ func NewOrderedSet[T comparable]() *OrderedSet[T] { return &OrderedSet[T]{make([]T, 0), NewSet[T]()} } -func (s Set[T]) FromSlice(data []T) { - for v := range slices.Values(data) { +func (s Set[T]) FromSlice(slice []T) { + for v := range slices.Values(slice) { s.Add(v) } } -func (s *OrderedSet[T]) FromSlice(data []T) { - for v := range slices.Values(data) { +func (s *OrderedSet[T]) FromSlice(slice []T) { + for v := range slices.Values(slice) { s.Add(v) } }