Skip to content

Commit

Permalink
Slice can take any slice (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 authored Sep 15, 2022
1 parent c3c7852 commit 459062d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func Subset[T any](collection []T, offset int, length uint) []T {
}

// Slice returns a copy of a slice from `start` up to, but not including `end`. Like `slice[start:end]`, but does not panic on overflow.
func Slice[T comparable](collection []T, start int, end int) []T {
func Slice[T any](collection []T, start int, end int) []T {
size := len(collection)

if start >= end {
Expand Down

0 comments on commit 459062d

Please sign in to comment.