From 168ebebe4f2961fc1569adea6bdaadd20911a242 Mon Sep 17 00:00:00 2001 From: Linneeeeeeee Date: Wed, 13 Sep 2023 16:42:57 +1000 Subject: [PATCH] Update slice.go --- slice.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/slice.go b/slice.go index f99298e..da60264 100644 --- a/slice.go +++ b/slice.go @@ -265,11 +265,6 @@ func (slice *Slice[T]) PrependLength(values ...T) int { return (slice.Prepend(values...).Length()) } -// Push adds a new element to the end of the slice and returns the length of the modified slice. -func (slice *Slice[T]) Push(values ...T) int { - return (slice.Append(values...).Length()) -} - // Replace changes the contents of the slice at the argument index if it is in bounds. func (slice *Slice[T]) Replace(i int, value T) bool { var ( @@ -332,8 +327,3 @@ func (slice *Slice[T]) Swap(i int, j int) { (*slice)[i], (*slice)[j] = (*slice)[j], (*slice)[i] } } - -// Unshift adds one or more elements to the beginning of the slice and returns the new length of the modified slice. -func (slice *Slice[T]) Unshift(values ...T) int { - return (slice.Prepend(values...).Length()) -}