Skip to content

fix: Render size, align and offset hover values in hex #14904

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

Merged
merged 1 commit into from
May 26, 2023

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented May 26, 2023

Arguably, these values are usually almost always viewed in hex format so I think we should do the same here

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 26, 2023
@Veykril
Copy link
Member Author

Veykril commented May 26, 2023

We could make this configurable if really desired, but I'll merge this for now.
@bors r+

@bors
Copy link
Contributor

bors commented May 26, 2023

📌 Commit be9cc0b has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented May 26, 2023

⌛ Testing commit be9cc0b with merge 3713c4b...

@bors
Copy link
Contributor

bors commented May 26, 2023

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 3713c4b to master...

@bors bors merged commit 3713c4b into rust-lang:master May 26, 2023
@bors bors mentioned this pull request May 26, 2023
@lnicola
Copy link
Member

lnicola commented May 28, 2023

Might be nice to only do this for numbers >= 16 or so, but doesn't matter too much.

@lnicola lnicola changed the title Render size, align and offset hover values in hex fix: Render size, align and offset hover values in hex May 28, 2023
@novacrazy
Copy link

This is very annoying. Please make it a toggle. A struct being 0x1B0 bytes in size is meaningless.

@lnicola
Copy link
Member

lnicola commented May 30, 2023

Tracked in #14918.

@gabe-lee
Copy link

I would like to have the option to go back to viewing it as plain decimal. Hexadecimal is great for memory operations, but doesn't really help my monkey brain when I'm trying to look at the computed size of a struct with lots of other complex fields to see the actual memory footprint.

Perhaps an option like:

  • Hexadecimal (default)
  • Decimal
  • Both

@lnicola
Copy link
Member

lnicola commented Jun 1, 2023

@gabe-lee that was actually added in #14929.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants