refactor: omit unnecessary reassignment (#4509)

This commit is contained in:
ledigang
2025-11-20 18:47:03 +08:00
committed by GitHub
parent 84e2c760d9
commit 712482ffb9
3 changed files with 0 additions and 3 deletions

View File

@@ -43,7 +43,6 @@ func UploadPermissions(owner string, path string) (bool, error) {
newPermissions := []*Permission{}
for index, line := range table {
line := line
if index == 0 || parseLineItem(&line, 0) == "" {
continue
}

View File

@@ -43,7 +43,6 @@ func UploadRoles(owner string, path string) (bool, error) {
newRoles := []*Role{}
for index, line := range table {
line := line
if index == 0 || parseLineItem(&line, 0) == "" {
continue
}

View File

@@ -124,7 +124,6 @@ func chooseFaviconLinkBySizes(links []Link) *Link {
var chosenLink *Link
for _, link := range links {
link := link
if chosenLink == nil || compareSizes(link.Sizes, chosenLink.Sizes) > 0 {
chosenLink = &link
}