mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Removed unnecessary conversions (#7557)
No need to convert to the same type.
This commit is contained in:
committed by
zeripath
parent
2f75766532
commit
54d96c79b5
@@ -500,7 +500,7 @@ func getIssueFromRef(repo *Repository, ref string) (*Issue, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
issue, err := GetIssueByIndex(refRepo.ID, int64(issueIndex))
|
||||
issue, err := GetIssueByIndex(refRepo.ID, issueIndex)
|
||||
if err != nil {
|
||||
if IsErrIssueNotExist(err) {
|
||||
return nil, nil
|
||||
@@ -565,7 +565,7 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit, bra
|
||||
|
||||
// issue is from another repo
|
||||
if len(m[1]) > 0 && len(m[2]) > 0 {
|
||||
refRepo, err = GetRepositoryFromMatch(string(m[1]), string(m[2]))
|
||||
refRepo, err = GetRepositoryFromMatch(m[1], m[2])
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
@@ -602,7 +602,7 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit, bra
|
||||
|
||||
// issue is from another repo
|
||||
if len(m[1]) > 0 && len(m[2]) > 0 {
|
||||
refRepo, err = GetRepositoryFromMatch(string(m[1]), string(m[2]))
|
||||
refRepo, err = GetRepositoryFromMatch(m[1], m[2])
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
@@ -631,7 +631,7 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit, bra
|
||||
|
||||
// issue is from another repo
|
||||
if len(m[1]) > 0 && len(m[2]) > 0 {
|
||||
refRepo, err = GetRepositoryFromMatch(string(m[1]), string(m[2]))
|
||||
refRepo, err = GetRepositoryFromMatch(m[1], m[2])
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
@@ -113,7 +113,7 @@ func (p *Permission) ColorFormat(s fmt.State) {
|
||||
configBytes, err := unit.Config.ToDB()
|
||||
config = string(configBytes)
|
||||
if err != nil {
|
||||
config = string(err.Error())
|
||||
config = err.Error()
|
||||
}
|
||||
}
|
||||
format += "\nUnits[%d]: ID: %d RepoID: %d Type: %-v Config: %s"
|
||||
|
Reference in New Issue
Block a user