Skip to content

Commit bc3f2ff

Browse files
authored
Merge pull request #1 from orsinium-labs/splice-subtypes
2 parents 6bcba9f + 982ee00 commit bc3f2ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ffrand/random.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ func Shuffle(n int, swap func(i, j int)) {
239239
// Implements the Fisher-Yates shuffle algorithm.
240240
//
241241
// Uses the default [Rand].
242-
func ShuffleSlice[E any](slice []E) {
242+
func ShuffleSlice[E any, S ~[]E](slice S) {
243243
for i := len(slice) - 1; i > 0; i = i - 1 {
244244
j := Intn(i + 1)
245245
slice[i], slice[j] = slice[j], slice[i]

0 commit comments

Comments
 (0)