removed the definition of mask

This commit is contained in:
kenta7777 2019-03-12 01:15:05 +09:00
parent 0ede9e61e2
commit 18b40c6413

View File

@ -434,9 +434,3 @@ pub fn truncate(value: u128, size: Size) -> u128 {
// truncate (shift left to drop out leftover values, shift right to fill with zeroes)
(value << shift) >> shift
}
pub fn mask(size: Size) -> u128 {
let size = size.bits();
let shift = 128 - size;
!0u128 >> shift
}