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

Use ubyte instead of humansize #333

Merged
merged 1 commit into from
Jan 5, 2023
Merged

Use ubyte instead of humansize #333

merged 1 commit into from
Jan 5, 2023

Conversation

vrmiguel
Copy link
Member

@vrmiguel vrmiguel commented Jan 5, 2023

Uses Sergio Benitez's ubyte crate instead of humansize.

The main reasoning for this is removing the use of humansize's inefficient format_size function. It could be replaced by SizeFormatter::new(bytes, DECIMAL); but that seems too verbose. ubyte's usage instead looks like size.bytes() and does not allocate

As another very minor win we get to stop compiling Rust's libm

P.S. I'm not sure why we stopped using our own Bytes struct

@figsoda figsoda merged commit 60bbf43 into main Jan 5, 2023
@figsoda figsoda deleted the ubyte branch January 5, 2023 18:23
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