We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e3f071 commit 65dcf62Copy full SHA for 65dcf62
ringlist/ringlist.go
@@ -14,15 +14,12 @@ type ListElement[E any] interface {
14
Prev() E
15
}
16
17
-// PtrListElement is a pointer list element constraint.
18
-type PtrListElement[T any, E any] interface {
19
- *T
20
- ListElement[E]
21
-}
22
-
23
// List is a generic circular doubly linked list.
24
// The zero value is a ready to use empty list.
25
-type List[T any, E PtrListElement[T, E]] struct {
+type List[T any, E interface {
+ *T
+ ListElement[E]
+}] struct {
26
tail E
27
len int
28
0 commit comments