mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
removed the definition of mask
This commit is contained in:
parent
0ede9e61e2
commit
18b40c6413
@ -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…
Reference in New Issue
Block a user