Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Commit

Permalink
Remove unnecessary call to strings.TrimPrefix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhevron committed May 11, 2015
1 parent eae42f8 commit 9377d0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions semver/constraint.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func ParseConstraint(str string) (*Constraint, error) {
}
operator += string(r)
}
str = str[len(c.Operator):]
str = str[len(operator):]

operators := []string{"=", ">", "<", ">=", "<="}
for _, o := range operators {
Expand All @@ -61,7 +61,7 @@ func ParseConstraint(str string) (*Constraint, error) {
return nil, ErrInvalidOperator
}

v, err := ParseVersion(strings.TrimPrefix(str, c.Operator))
v, err := ParseVersion(str)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 9377d0b

Please sign in to comment.