fix: cast limit to int for slice capacity

This commit is contained in:
2026-05-20 17:15:26 +02:00
committed by Mikkel Elvers
parent 2cfab673f6
commit abc2368842

View File

@@ -46,7 +46,7 @@ LIMIT ?`, userID, needle, pattern, pattern, pattern, pattern, limit)
}
defer rows.Close()
items := make([]GetContinueWatchingEntriesRow, 0, limit)
items := make([]GetContinueWatchingEntriesRow, 0, int(limit))
for rows.Next() {
var item GetContinueWatchingEntriesRow
if err := rows.Scan(
@@ -124,7 +124,7 @@ LIMIT ?`, userID, needle, pattern, pattern, pattern, pattern, limit)
}
defer rows.Close()
items := make([]GetUserWatchListRow, 0, limit)
items := make([]GetUserWatchListRow, 0, int(limit))
for rows.Next() {
var item GetUserWatchListRow
if err := rows.Scan(