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 PartialEq and PartialOrd instances for byte arrays [u8; N] #191

Closed

Conversation

joshtriplett
Copy link
Contributor

Add instances for [u8; N] and &[u8; N], for convenience.

Verified to work with current MSRV of 1.65.

Add test for these impls.


Note that to test with the MSRV of 1.65, I had to manually downgrade
ucd-parse in the lockfile to 1.10, because newer versions have an MSRV of
1.70. After downgrading that, the tests passed with 1.65.

Add instances for `[u8; N]` and `&[u8; N]`, for convenience.

Verified to work with current MSRV of 1.65.

Add test for these impls.
Copy link
Contributor

@lopopolo lopopolo left a comment

Choose a reason for hiding this comment

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

Are y'all open to adding these for i8 too generally across the library so these impls work for either of the type aliases for c_char?

@joshtriplett
Copy link
Contributor Author

@lopopolo I think that would be a separate larger change, since bstr is built around u8. It'd be doable but would involve more code.

@joshtriplett
Copy link
Contributor Author

joshtriplett commented Oct 29, 2024

The CI failure seems unrelated. #192 fixes it.

BurntSushi pushed a commit that referenced this pull request Nov 13, 2024
Add instances for `[u8; N]` and `&[u8; N]`, for convenience.

Closes #191
BurntSushi pushed a commit that referenced this pull request Nov 13, 2024
Add instances for `[u8; N]` and `&[u8; N]`, for convenience.

Closes #191
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