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

Add formatting of bytes into the best unit of measurement #2784

Merged
merged 6 commits into from
Sep 14, 2023

Conversation

laytan
Copy link
Collaborator

@laytan laytan commented Sep 1, 2023

I've been doing a lot of logging of memory sizes, and made this procedure to nicely format it. Then I thought this might fit into the fmt package nicely so I made this PR.

At first I tried adding this as an implicit formatter for the mem.* constants, this requires them to be of the same type and marked a distinct type though, which breaks a lot of code.

core/fmt/fmt.odin Outdated Show resolved Hide resolved
@gingerBill gingerBill merged commit 6e49b1c into odin-lang:master Sep 14, 2023
3 checks passed
@laytan laytan deleted the fmt-memory-sizes branch April 23, 2024 18:18
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.

2 participants