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

Allow UUID style formatting for inconsistent_digit_grouping lint #5451

Merged
merged 1 commit into from
Apr 12, 2020

Conversation

xyzd0
Copy link
Contributor

@xyzd0 xyzd0 commented Apr 12, 2020

This change adds a check to the inconsistent_digit_grouping to add a check for
NumericLiterals that follow the UUID format of 8-4-4-4-12.

If the NumericLiteral matches the UUID format, no further inconsistent grouping checks
will be performed.

Closes #5431

changelog: Allow UUID style formatting for inconsistent_digit_grouping lint

This change adds a check to the `inconsistent_digit_grouping` to add a check for
NumericLiterals that follow the UUID format of 8-4-4-4-12.

If the NumericLiteral matches the UUID format, no further inconsistent grouping checks
will be performed.

Closes rust-lang#5431
@xyzd0
Copy link
Contributor Author

xyzd0 commented Apr 12, 2020

First contribution to a Rust project so open to any suggestions and improvements!

@phansch
Copy link
Member

phansch commented Apr 12, 2020

First contribution to a Rust project so open to any suggestions and improvements!

Looks perfect to me, thanks 🎉

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 12, 2020

📌 Commit a296058 has been approved by phansch

@bors
Copy link
Collaborator

bors commented Apr 12, 2020

⌛ Testing commit a296058 with merge af5940b...

@bors
Copy link
Collaborator

bors commented Apr 12, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: phansch
Pushing af5940b to master...

@bors bors merged commit af5940b into rust-lang:master Apr 12, 2020
@Diggsey
Copy link

Diggsey commented Apr 12, 2020

@xyzd
Nice - btw, it's possible to compare slices and arrays directly for equality, so you could avoid the length check and the zip usage, and just do slice1 == slice2 or slice1 == fixed_size_array

@xyzd0 xyzd0 deleted the allow-uuid-format-digit-grouping branch April 13, 2020 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow UUID-style digit grouping
5 participants