We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a5f135 commit f365beaCopy full SHA for f365bea
1 file changed
src/cpu_mask.rs
@@ -53,12 +53,12 @@ pub struct CpuMaskResult {
53
/// Spec-level power-of-2 check: exactly one bit set.
54
/// A value `m` has exactly one bit iff `m != 0 && (m & (m - 1)) == 0`.
55
pub open spec fn is_power_of_two(m: u32) -> bool {
56
- m != 0 && (m as int) & ((m as int) - 1) == 0
+ m != 0 && (m & (m - 1)) == 0
57
}
58
59
/// Spec-level mask computation.
60
pub open spec fn compute_mask(current: u32, enable: u32, disable: u32) -> u32 {
61
- ((current | enable) & !disable) as u32
+ (current | enable) & !disable
62
63
64
// ------------------------------------------------------------------
0 commit comments