Skip to content

Commit

Permalink
Update slice.go
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsaygelle authored Sep 13, 2023
1 parent a40dc3b commit 168ebeb
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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())
}

0 comments on commit 168ebeb

Please sign in to comment.