Skip to content

Commit

Permalink
refactor(semantic): remove unneeded condition in PyPI version compara…
Browse files Browse the repository at this point in the history
…tor (#274)
  • Loading branch information
G-Rath authored Oct 31, 2024
1 parent 96bb62c commit f787d8d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/semantic/version-pypi.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,18 +225,14 @@ func (pv PyPIVersion) comparePre(pw PyPIVersion) int {
ai := pv.preIndex()
bi := pw.preIndex()

if ai == bi {
return pv.pre.number.Cmp(pw.pre.number)
}

if ai > bi {
return +1
}
if ai < bi {
return -1
}

return 0
return pv.pre.number.Cmp(pw.pre.number)
}
}

Expand Down

0 comments on commit f787d8d

Please sign in to comment.