Skip to content

Commit 1cbe142

Browse files
committed
refactor
1 parent e8e2b9c commit 1cbe142

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

list.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func NewList[T any](elems ...T) *List[T] {
1919
return l
2020
}
2121

22-
func NewListFromIter[T any](it iter.Seq[T]) *List[T] {
22+
func NewListFromIter[TIter goiter.SeqX[T], T any](it TIter) *List[T] {
2323
l := NewList[T]()
2424
for each := range it {
2525
l.Add(each)

list_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func TestList_RemoveAt(t *testing.T) {
123123
}
124124

125125
func TestList_Pop(t *testing.T) {
126-
list := NewListFromIter[int](goiter.Range(1, 3).Seq())
126+
list := NewListFromIter(goiter.Range(1, 3))
127127

128128
actual, ok := list.Pop()
129129
if !ok {

0 commit comments

Comments
 (0)