Repository navigation
Add VersionReq::is_exact - #205
Merged
Merged
Conversation
I have some logic where it would be useful to shortcut some behaviour if a `VersionReq` could only be matched by exactly one value. This would help me not end up re-parsing the semver string myself to guess whether it's a single fully-qualified exact match.
steveklabnik
approved these changes
May 24, 2020
steveklabnik
left a comment
Contributor
There was a problem hiding this comment.
Hi there! So sorry that I blocked your Cargo contribution here, I didn't realize!
I am happy to merge this, but getting it into a release may take some work. I am not sure if master is in a releasable state or not. I will try to figure that out ASAP!
Contributor
Author
|
Thanks for the merge! No rush with the releasing - we're using a workaround in Cargo for now (inferring this property from the string representation of a Thanks again! |
Contributor
|
Great! I've published as 0.10.0; the breaking change wasn't actually merged yet, so this should be fine! This is the only new API in the new release. |
takumi-earth
pushed a commit
to earthlings-dev/semver
that referenced
this pull request
Jan 27, 2026
Add `VersionReq::is_exact`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have some logic where it would be useful to shortcut some behaviour if
a
VersionReqcould only be matched by exactly one value. This wouldhelp me not end up re-parsing the semver string myself to guess whether
it's a single fully-qualified exact match.