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

introduce UuidError for general Uuid use #284

Merged
merged 4 commits into from
Jul 24, 2018
Merged

introduce UuidError for general Uuid use #284

merged 4 commits into from
Jul 24, 2018

Conversation

kinggoesgaming
Copy link
Member

@kinggoesgaming kinggoesgaming commented Jul 23, 2018

I'm submitting a(n) feature, refactor

Description

  • Introduce a ::UuidError type.
  • Change signature of ::Uuid::from_fields, ::Uuid::new_v1 and ::Uuid::from_bytes to use the new error type.

This now splits the Uuid creation types into 3 categories:

  • those which have no errors for creating
  • those which throw errors based around parsing (currently ParseError)
  • those which throw errors based around bytes (UuidError)

Motivation

ParseError is oriented around parsing uuid strings. However, that error type does not bode well functions that are accepting bytes.

Tests

All current tests pass with the signature change. No new tests added

Related Issue(s)

closes #281

Signed-off-by: Hunar Roop Kahlon <hunar.roop@gmail.com>
@kinggoesgaming kinggoesgaming added Type:Refactor breaking This causes a breaking change and will be merged to breaking branch. labels Jul 23, 2018
@kinggoesgaming kinggoesgaming added this to the 0.7.0 milestone Jul 23, 2018
@kinggoesgaming kinggoesgaming self-assigned this Jul 23, 2018
Signed-off-by: Hunar Roop Kahlon <hunar.roop@gmail.com>
@kinggoesgaming kinggoesgaming changed the title wip: introduce UuidError for general Uuid use introduce UuidError for general Uuid use Jul 23, 2018
Signed-off-by: Hunar Roop Kahlon <hunar.roop@gmail.com>
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 Jul 24, 2018
284: introduce UuidError for general Uuid use r=Dylan-DPC a=kinggoesgaming

**I'm submitting a(n)** feature, refactor

# Description
* Introduce a `::UuidError` type.
* Change signature of `::Uuid::from_fields`, `::Uuid::new_v1` and `::Uuid::from_bytes` to use the new error type.

This now splits the `Uuid` creation types into 3 categories:
* those which have no errors for creating
* those which throw errors based around parsing (currently `ParseError`)
* those which throw errors based around bytes (`UuidError`)

# Motivation
`ParseError` is oriented around parsing uuid strings. However, that error type does not bode well functions that are accepting bytes. 

# Tests
All current tests pass with the signature change. No new tests added

# Related Issue(s)
closes #281 


Co-authored-by: Hunar Roop Kahlon <hunar.roop@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jul 24, 2018

@bors bors bot merged commit 9542348 into breaking Jul 24, 2018
@Dylan-DPC-zz Dylan-DPC-zz deleted the uuid_error branch July 24, 2018 08:51
LinusU pushed a commit to LinusU/uuid that referenced this pull request Feb 26, 2020
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.

2 participants