Add Nil Version #176
No reviewers
Labels
No labels
breaking
bug
dependencies
good first issue
help wanted
unstable
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-uuid-rs/uuid!176
Loading…
Reference in a new issue
No description provided.
Delete branch "nil-variant"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm submitting a ...
Description
Adds
Nilvariant to theUuidVersion.Motivation
nilUuid, containing all zeros, is a validUuid, as per the specification. This will allow users doing pattern matching to explicitly check for it.Tests
Updated
test_nilto ensure thatRelated Issue(s)
closes #133
Thanks @kinggoesgaming! I think we should also add support for
UuidVersion::Nilto theUuid::newmethod.@ -645,0 +698,4 @@/// use uuid::Uuid;/// use uuid::UuidBytes;//////If we're going to add an explicit
Nilvariant then I think we should change this match to0 if self.is_nil(), since this version is a bit unique in purely describing the value of the uuid. We can prove when the version is not valid. Otherwise:Is actually true, even though that uuid is definitely not nil.
@KodrAus I was actually thinking of removing the
Uuid::newfunction. It serves no purpose other than forv4users.@ -645,0 +698,4 @@/// use uuid::Uuid;/// use uuid::UuidBytes;//////Fixed
RIP... wrong merge :(
Opening a new PR
Pull request closed