Allow Uuid v3 and v5 be constructed from bytes #270
No reviewers
Labels
No labels
breaking
bug
dependencies
good first issue
help wanted
unstable
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-uuid-rs/uuid!270
Loading…
Reference in a new issue
No description provided.
Delete branch "patch-1"
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
Allow byte slices to be used for uuid construction
Motivation
I don't believe there is anything that specifies that these should be created from utf-8 encoded
strings so expanding these to conver byte slices as well should be harmless
(might be a breaking change though due to inference changes).
Tests
N/A
Related Issue(s)
https://github.com/uuid-rs/uuid/issues/271
There were the following issues with your Pull Request
Guidelines are available at https://github.com/uuid-rs/uuid
This message was auto-generated by https://gitcop.com
hi @Marwes thanks for the PR.
We have started working on a 0.7.0 already so it will be better to target the breaking branch instead of master.
There were the following issues with your Pull Request
Guidelines are available at https://github.com/uuid-rs/uuid
This message was auto-generated by https://gitcop.com
There were the following issues with your Pull Request
e6574fcf8eGuidelines are available at https://github.com/uuid-rs/uuid
This message was auto-generated by https://gitcop.com
Ignore gitcop for now
@Marwes run cargo fmt with the latest nightly to fix build errors
There were the following issues with your Pull Request
Commit:
e6574fcf8eCommits must be in the following format: %{type}(%{scope}): %{description}
Commit:
af5fca9379Commits must be in the following format: %{type}(%{scope}): %{description}
Guidelines are available at https://github.com/uuid-rs/uuid
This message was auto-generated by https://gitcop.com
Thinking about this again... I don't think this should be considered a breaking change, as the change only makes input more permissible, not less.
It can break things like
new_v5(String::new().as_ref()), which are easy to fix but can still be annoying. rust does allow for such breakages from the standard library but since there is actually a breaking release planned here I think it is safer to just wait.It ensures that the actual implementation only gets monomorphized once, regardless of the type of
S. Alternatively we could make thenew_functions only take&[u8]@Marwes Since we are okay with a breaking change, i think it is better to combine both functions into a single function.
@Dylan-DPC Changed the functions to only take
&[u8]bors: r+
Build succeeded