updated dependencies and go
This commit is contained in:
+2
-3
@@ -2,7 +2,6 @@ package dataext
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
|
||||
"sync"
|
||||
)
|
||||
|
||||
@@ -64,7 +63,7 @@ func (s *Stack[T]) OptPop() *T {
|
||||
result := s.data[l-1]
|
||||
s.data = s.data[:l-1]
|
||||
|
||||
return langext.Ptr(result)
|
||||
return new(result)
|
||||
}
|
||||
|
||||
func (s *Stack[T]) Peek() (T, error) {
|
||||
@@ -94,7 +93,7 @@ func (s *Stack[T]) OptPeek() *T {
|
||||
return nil
|
||||
}
|
||||
|
||||
return langext.Ptr(s.data[l-1])
|
||||
return new(s.data[l-1])
|
||||
}
|
||||
|
||||
func (s *Stack[T]) Length() int {
|
||||
|
||||
Reference in New Issue
Block a user