mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Use slices package from the stdlib when possible (#5360)
* Use slices from the stdlib when possible * Add some unit tests * More small tweaks + add benchmark func
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
"github.com/stashapp/stash/pkg/models"
|
||||
@@ -398,7 +399,7 @@ func (qb *ImageStore) FindMany(ctx context.Context, ids []int) ([]*models.Image,
|
||||
}
|
||||
|
||||
for _, s := range unsorted {
|
||||
i := sliceutil.Index(ids, s.ID)
|
||||
i := slices.Index(ids, s.ID)
|
||||
images[i] = s
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user