transmutability: Support char, NonZeroXxx

Note that `NonZero` support is not wired up, as the author encountered
bugs while attempting this. A future commit will wire up `NonZero`
support.
This commit is contained in:
Joshua Liebow-Feeser
2025-04-22 15:43:34 -07:00
parent 3c877f6a47
commit ae0c2fe3d8
6 changed files with 302 additions and 46 deletions

View File

@@ -65,7 +65,12 @@ impl fmt::Debug for Byte {
}
}
#[cfg(test)]
impl From<RangeInclusive<u8>> for Byte {
fn from(src: RangeInclusive<u8>) -> Self {
Self::new(src)
}
}
impl From<u8> for Byte {
fn from(src: u8) -> Self {
Self::from_val(src)