dzamlo / rust-bitfield

This crate provides macros to generate bitfield-like struct.
Apache License 2.0
157 stars 19 forks source link

Implement Bitwise Operations for All Array-Like Types #46

Closed PokeJofeJr4th closed 2 months ago

PokeJofeJr4th commented 2 months ago

When adding bitwise operations to the array types, I didn't realize how easy it would be to use the AsMut and AsRef traits. Instead, I only implemented it for arrays of the form [uX; N]. This PR adds bitwise operations for all supported types, most notably including including Vec.

I'm not particularly familiar with semver, but if this ends up as a feature on its own, I think it could be considered a patch; the only API surface change is that these impls now work with a couple more types.