mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Replace util.SliceXxx
with slices.Xxx
(#26958)
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"math/big"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"slices"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -3628,7 +3629,7 @@ func issuePosters(ctx *context.Context, isPullList bool) {
|
||||
if search == "" && ctx.Doer != nil {
|
||||
// the returned posters slice only contains limited number of users,
|
||||
// to make the current user (doer) can quickly filter their own issues, always add doer to the posters slice
|
||||
if !util.SliceContainsFunc(posters, func(user *user_model.User) bool { return user.ID == ctx.Doer.ID }) {
|
||||
if !slices.ContainsFunc(posters, func(user *user_model.User) bool { return user.ID == ctx.Doer.ID }) {
|
||||
posters = append(posters, ctx.Doer)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user