1
This commit is contained in:
parent
50cb269954
commit
3d4c6f692f
@ -199,7 +199,7 @@ func NewSlice[T any](s *[]T, len int32, cap int32) {
|
|||||||
func NewSliceElement[T any](s *[]T) *T {
|
func NewSliceElement[T any](s *[]T) *T {
|
||||||
v := new(T)
|
v := new(T)
|
||||||
*s = append(*s, *v)
|
*s = append(*s, *v)
|
||||||
return v
|
return &(*s)[len(*s) - 1]
|
||||||
}
|
}
|
||||||
|
|
||||||
func AppendSlice[T any](s *[]T, val T) {
|
func AppendSlice[T any](s *[]T, val T) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user