Skip to content

Commit 65dcf62

Browse files
committed
Undo the ptr element constraint
1 parent 5e3f071 commit 65dcf62

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

ringlist/ringlist.go

+4-7
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,12 @@ type ListElement[E any] interface {
1414
Prev() E
1515
}
1616

17-
// PtrListElement is a pointer list element constraint.
18-
type PtrListElement[T any, E any] interface {
19-
*T
20-
ListElement[E]
21-
}
22-
2317
// List is a generic circular doubly linked list.
2418
// The zero value is a ready to use empty list.
25-
type List[T any, E PtrListElement[T, E]] struct {
19+
type List[T any, E interface {
20+
*T
21+
ListElement[E]
22+
}] struct {
2623
tail E
2724
len int
2825
}

0 commit comments

Comments
 (0)