-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Nil variant #181
Add Nil variant #181
Conversation
Signed-off-by: Hunar Roop Kahlon <hunar.roop@gmail.com>
Signed-off-by: Hunar Roop Kahlon <hunar.roop@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
src/lib.rs
Outdated
@@ -151,6 +151,8 @@ pub type UuidBytes = [u8; 16]; | |||
/// The version of the UUID, denoting the generating algorithm. | |||
#[derive(Debug, PartialEq, Copy, Clone)] | |||
pub enum UuidVersion { | |||
/// Special case for `nil` [`struct.Uuid.html`]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we have the [struct.Uuid.html
] here for? Does this render in the docs as struct.Uuid.html
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops I forgot to link it will fix it ASAP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was supposed to be Uuid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KodrAus fixed.. can you approve
Signed-off-by: Hunar Roop Kahlon <hunar.roop@gmail.com>
8b5c74e
bors: r+ |
181: Add Nil variant r=Dylan-DPC a=kinggoesgaming <!-- As we are working towards a stable version of uuid, we require that you open an issue, before submitting a pull request. If the pull request is imcomplete, prepend the Title with WIP: --> **I'm submitting a ...** - [ ] bug fix - [x] feature enhancement - [ ] deprecation or removal - [ ] refactor # Description Adds `Nil` variant to the `UuidVersion`. # Motivation `nil` `Uuid`, containing all zeros, is a valid `Uuid`, as per the specification. This will allow users doing pattern matching to explicitly check for it. # Tests Updated `test_nil` to ensure that # Related Issue(s) closes #133 supersedes #176
188: Add UuidVersion to the prelude r=Dylan-DPC a=kinggoesgaming **I'm submitting a ...** - [ ] bug fix - [x] feature enhancement - [ ] deprecation or removal - [ ] refactor # Description Add `UuidVersion` to the prelude. # Motivation With #181, `UuidVersion` is now stable, and as such can be used as part of the `prelude` # Tests N/A # Related Issue(s) #181, #166
188: Add UuidVersion to the prelude r=kinggoesgaming a=kinggoesgaming **I'm submitting a ...** - [ ] bug fix - [x] feature enhancement - [ ] deprecation or removal - [ ] refactor # Description Add `UuidVersion` to the prelude. # Motivation With #181, `UuidVersion` is now stable, and as such can be used as part of the `prelude` # Tests N/A # Related Issue(s) #181, #166
I'm submitting a ...
Description
Adds
Nil
variant to theUuidVersion
.Motivation
nil
Uuid
, 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_nil
to ensure thatRelated Issue(s)
closes #133
supersedes #176