This commit is contained in:
Trevor Spiteri 2019-10-10 17:19:10 +02:00
parent cfe198f087
commit b6c1974401
1 changed files with 2 additions and 2 deletions

View File

@ -132,13 +132,13 @@ macro_rules! compile_time {
compile_time! {
impl<Frac: $LeEqU> StaticCast<$IntI> for $FixedU<Frac> {
8 * mem::size_of::<$IntI>() as u32 >= $FixedU::<Frac>::INT_NBITS + 1
8 * mem::size_of::<$IntI>() as u32 > $FixedU::<Frac>::INT_NBITS
}
}
compile_time! {
impl<Frac: $LeEqU> StaticCast<$FixedI<Frac>> for $IntU {
$FixedI::<Frac>::INT_NBITS >= 8 * mem::size_of::<$IntU>() as u32 + 1
$FixedI::<Frac>::INT_NBITS > 8 * mem::size_of::<$IntU>() as u32
}
}