modular-bitfield
modular-bitfield copied to clipboard
Add Specifier trait implementation for nonzero primitives
Adds Specifier trait implementations for non zero primitives, an Option types containing non-zero primitives
This allows Option<NonZero<u16>> etc to be used in bitfield specification directly.
This approach was chosen over the blanket implmentation for NonZero types
impl<T: Specifier + ZeroablePrimitive> Specifier for NonZero<T> {
// ...
}
That approach requires the unstable language feature ZeroablePrimitive to be enabled, whereas the provided implementation works on stable
Hi! I am going through and triaging old PRs. Are you still interested in working on this and would like a review? Thanks!