From bc2f640a95b5ffd711dd6d275d9a865baac3b52c Mon Sep 17 00:00:00 2001 From: JakobDev Date: Mon, 30 Dec 2024 17:47:34 +0100 Subject: [PATCH] Update --- models/repo/release_test.go | 2 +- modules/card/card.go | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/models/repo/release_test.go b/models/repo/release_test.go index c8e489b9a7..7680f2cc9d 100644 --- a/models/repo/release_test.go +++ b/models/repo/release_test.go @@ -35,7 +35,7 @@ func TestReleaseLoadRepo(t *testing.T) { require.NoError(t, release.LoadRepo(db.DefaultContext)) - assert.Equal(t, int64(1), release.Repo.ID) + assert.EqualValues(t, 1, release.Repo.ID) } func TestReleaseDisplayName(t *testing.T) { diff --git a/modules/card/card.go b/modules/card/card.go index b7f31895c5..370d241073 100644 --- a/modules/card/card.go +++ b/modules/card/card.go @@ -339,9 +339,5 @@ func (c *Card) DrawExternalImage(url string) { // DrawRect draws a rect with the given color func (c *Card) DrawRect(startX, startY, endX, endY int, color color.Color) { - for x := startX; x <= endX; x++ { - for y := startY; y <= endY; y++ { - c.Img.Set(x, y, color) - } - } + draw.Draw(c.Img, image.Rect(startX, startY, endX, endY), &image.Uniform{color}, image.Point{}, draw.Src) }