-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Keep array types on same line as prefix for statics #6995
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
base: main
Are you sure you want to change the base?
Changes from all commits
50aae64
ac72e0f
a7e8700
271d4d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // rustfmt-style_edition: 2024 | ||
|
|
||
| pub(super) const ENCRYPTED_USERNAME_ENTROPY: [u8; | ||
| usernames::constants::USERNAME_LINK_ENTROPY_SIZE] = | ||
| const_str::hex!("4302c613c092a51c5394becffeb6f697300a605348e93f03c3db95e0b03d28f1"); | ||
|
|
||
| // type is really long that it doesn't fit on the next line | ||
| pub(super) const ENCRYPTED_USERNAME_ENTROPY: | ||
| [ThisTypeIsReallyLongAbcdefghikjlmnopqrstuvwxyz; usernames::constants::USERNAME_LINK_ENTROPY_SIZE] = | ||
| const_str::hex!("4302c613c092a51c5394becffeb6f697300a605348e93f03c3db95e0b03d28f1"); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // rustfmt-style_edition: 2027 | ||
|
|
||
| pub(super) const ENCRYPTED_USERNAME_ENTROPY: [u8; | ||
| usernames::constants::USERNAME_LINK_ENTROPY_SIZE] = | ||
| const_str::hex!("4302c613c092a51c5394becffeb6f697300a605348e93f03c3db95e0b03d28f1"); | ||
|
|
||
| // type is really long that it doesn't fit on the next line | ||
| pub(super) const ENCRYPTED_USERNAME_ENTROPY: | ||
| [ThisTypeIsReallyLongAbcdefghikjlmnopqrstuvwxyz; usernames::constants::USERNAME_LINK_ENTROPY_SIZE] = | ||
| const_str::hex!("4302c613c092a51c5394becffeb6f697300a605348e93f03c3db95e0b03d28f1"); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // rustfmt-style_edition: 2024 | ||
|
|
||
| pub(super) const ENCRYPTED_USERNAME_ENTROPY: [u8; | ||
| usernames::constants::USERNAME_LINK_ENTROPY_SIZE] = | ||
| const_str::hex!("4302c613c092a51c5394becffeb6f697300a605348e93f03c3db95e0b03d28f1"); | ||
|
|
||
| // type is really long that it doesn't fit on the next line | ||
| pub(super) const ENCRYPTED_USERNAME_ENTROPY: [ThisTypeIsReallyLongAbcdefghikjlmnopqrstuvwxyz; | ||
| usernames::constants::USERNAME_LINK_ENTROPY_SIZE] = | ||
| const_str::hex!("4302c613c092a51c5394becffeb6f697300a605348e93f03c3db95e0b03d28f1"); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // rustfmt-style_edition: 2027 | ||
|
|
||
| pub(super) const ENCRYPTED_USERNAME_ENTROPY: | ||
| [u8; usernames::constants::USERNAME_LINK_ENTROPY_SIZE] = | ||
| const_str::hex!("4302c613c092a51c5394becffeb6f697300a605348e93f03c3db95e0b03d28f1"); | ||
|
|
||
| // type is really long that it doesn't fit on the next line | ||
| pub(super) const ENCRYPTED_USERNAME_ENTROPY: [ThisTypeIsReallyLongAbcdefghikjlmnopqrstuvwxyz; | ||
| usernames::constants::USERNAME_LINK_ENTROPY_SIZE] = | ||
| const_str::hex!("4302c613c092a51c5394becffeb6f697300a605348e93f03c3db95e0b03d28f1"); | ||
|
Comment on lines
+7
to
+10
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmmm 🤔 so when the type is too long we still end up with the same formatting that #6976 was hoping to avoid. To be honest, I'm not sure how to handle this right now. I'd like @rust-lang/style to weigh in on this one before moving forward. Edit: Here's the link to the Zulip discussion: #t-style > Guidance on Array Type wrapping |
||
Uh oh!
There was an error while loading. Please reload this page.