removed the definition of mask
This commit is contained in:
parent
0ede9e61e2
commit
18b40c6413
1 changed files with 0 additions and 6 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue