Skip to content

Commit

Permalink
Merge pull request #9 from sdboyer/strings-not-fp
Browse files Browse the repository at this point in the history
Strings are not the fastpath
  • Loading branch information
mattfarina committed Apr 5, 2016
2 parents 2e5b94a + 26510d1 commit 1bdc6b3
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ func (v *Version) Equal(o *Version) bool {
// Versions are compared by X.Y.Z. Build metadata is ignored. Prerelease is
// lower than the version without a prerelease.
func (v *Version) Compare(o *Version) int {

// Fastpath if both versions are the same.
if v.String() == o.String() {
return 0
}

// Compare the major, minor, and patch version for differences. If a
// difference is found return the comparison.
if d := compareSegment(v.Major(), o.Major()); d != 0 {
Expand Down

0 comments on commit 1bdc6b3

Please sign in to comment.