Removed unnecessary conversions (#7557)

No need to convert to the same type.
This commit is contained in:
Christian Muehlhaeuser
2019-07-23 20:50:39 +02:00
committed by zeripath
parent 2f75766532
commit 54d96c79b5
24 changed files with 39 additions and 46 deletions

View File

@ -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
}