fix: cast limit to int for slice capacity
This commit is contained in:
@@ -46,7 +46,7 @@ LIMIT ?`, userID, needle, pattern, pattern, pattern, pattern, limit)
|
|||||||
}
|
}
|
||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
items := make([]GetContinueWatchingEntriesRow, 0, limit)
|
items := make([]GetContinueWatchingEntriesRow, 0, int(limit))
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var item GetContinueWatchingEntriesRow
|
var item GetContinueWatchingEntriesRow
|
||||||
if err := rows.Scan(
|
if err := rows.Scan(
|
||||||
@@ -124,7 +124,7 @@ LIMIT ?`, userID, needle, pattern, pattern, pattern, pattern, limit)
|
|||||||
}
|
}
|
||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
items := make([]GetUserWatchListRow, 0, limit)
|
items := make([]GetUserWatchListRow, 0, int(limit))
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var item GetUserWatchListRow
|
var item GetUserWatchListRow
|
||||||
if err := rows.Scan(
|
if err := rows.Scan(
|
||||||
|
|||||||
Reference in New Issue
Block a user