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

It would be great if we were to allow creating ByteSize constants #21

Merged
merged 1 commit into from
Feb 25, 2021

Conversation

pmnoxx
Copy link
Contributor

@pmnoxx pmnoxx commented Feb 19, 2021

Currently there is no way to create a global constant of ByteSize.
This PR should add that feature.

const MEMORY_LIMIT2: ByteSize = ByteSize::mb(512);

@pmnoxx
Copy link
Contributor Author

pmnoxx commented Feb 19, 2021

@hyunsik can you take a look?

@pmnoxx pmnoxx changed the title It will be great if we allow creating ByteSize constants It would be great if we were to allow creating ByteSize constants Feb 19, 2021
@hyunsik
Copy link
Member

hyunsik commented Feb 23, 2021

@pmnoxx Hi, thank you for submitting PR. I'll review your PR today.

@hyunsik hyunsik merged commit 5f89f4c into bytesize-rs:master Feb 25, 2021
@hyunsik
Copy link
Member

hyunsik commented Feb 25, 2021

Thank you for your PR. It's very necessary feature for this crate. I'll make a new release with this PR this week.

@pmnoxx pmnoxx deleted the piotr-add-const-to-bytesize branch February 25, 2021 22:48
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