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

Remove byteorder dependency #360

Merged
merged 1 commit into from Aug 31, 2023

Conversation

psychon
Copy link
Contributor

@psychon psychon commented Aug 17, 2023

The Rust standard library includes some byteorder-like helper functions for a while already. This commit replaces the use of byteorder with these helper functions.


I have no particular reason for this except for trying to remove a dependency. byteorder is not a "bad" dependency, but it still seemed unnecessary to me to do what is being done here.

Feel free to tell me that this is not worth it. :-)

The Rust standard library includes some byteorder-like helper functions
for a while already. This commit replaces the use of byteorder with
these helper functions.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Copy link
Member

@matthew-russo matthew-russo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look innocuous. In general I'm in favor of removing dependencies if the replacement is trivial logic.

For my own curiosity I want to go back and check commit history later to check the commit that added the dependency to see if there's any additional context.

@psychon
Copy link
Contributor Author

psychon commented Aug 17, 2023

to check the commit that added the dependency to see if there's any additional context.

git log --reverse -p -S byteorder says this was added in commit 4ba7873. That commit adds the dependency, but makes no use of it?!

Commit e9fe26a adds it as extern crate, but still makes no use of it.

The first real use appears in commit 6953a23 in a function convert_to_new_format(). It is used to convert [u32; 4] to [u8; 16] in little endian.

Dunno...

@matthew-russo
Copy link
Member

Ha that was quick -- thanks for checking.

Copy link
Member

@cameron1024 cameron1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this <3

@rex-remind101 rex-remind101 merged commit 7292965 into proptest-rs:master Aug 31, 2023
5 checks passed
@psychon psychon deleted the remove-byteorder branch August 31, 2023 05:55
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.

None yet

4 participants