Skip to content
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

Merged
merged 6 commits into from
Mar 25, 2018
Merged

Add Nil variant #181

merged 6 commits into from
Mar 25, 2018

Conversation

kinggoesgaming
Copy link
Member

I'm submitting a ...

  • bug fix
  • 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

Signed-off-by: Hunar Roop Kahlon <hunar.roop@gmail.com>
@kinggoesgaming kinggoesgaming added Type:Enhancement breaking This causes a breaking change and will be merged to breaking branch. labels Mar 21, 2018
@kinggoesgaming kinggoesgaming added this to the 0.7.0 milestone Mar 21, 2018
@kinggoesgaming kinggoesgaming self-assigned this Mar 21, 2018
Signed-off-by: Hunar Roop Kahlon <hunar.roop@gmail.com>
Dylan-DPC-zz
Dylan-DPC-zz previously approved these changes Mar 21, 2018
KodrAus
KodrAus previously approved these changes Mar 21, 2018
Copy link
Member

@KodrAus KodrAus left a 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`].
Copy link
Member

@KodrAus KodrAus Mar 22, 2018

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?

Copy link
Member Author

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

Copy link
Member Author

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

Copy link
Member Author

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>
kinggoesgaming and others added 2 commits March 24, 2018 21:08
Signed-off-by: Hunar Roop Kahlon <hunar.roop@gmail.com>
@Dylan-DPC-zz
Copy link
Member

bors: r+

bors bot added a commit that referenced this pull request Mar 25, 2018
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
@bors
Copy link
Contributor

bors bot commented Mar 25, 2018

@bors bors bot merged commit 4e9c33f into breaking Mar 25, 2018
@Dylan-DPC-zz Dylan-DPC-zz deleted the nil-variant branch March 25, 2018 21:43
bors bot added a commit that referenced this pull request Mar 28, 2018
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
bors bot added a commit that referenced this pull request Mar 28, 2018
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This causes a breaking change and will be merged to breaking branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants