We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3173cd1 commit 22b263aCopy full SHA for 22b263a
src/libcore/ptr/mod.rs
@@ -1081,8 +1081,7 @@ pub(crate) unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usize {
1081
// uses e.g., subtraction `mod n`. It is entirely fine to do them `mod
1082
// usize::max_value()` instead, because we take the result `mod n` at the end
1083
// anyway.
1084
- inverse = inverse.wrapping_mul(2usize.wrapping_sub(x.wrapping_mul(inverse)))
1085
- & (going_mod - 1);
+ inverse = inverse.wrapping_mul(2usize.wrapping_sub(x.wrapping_mul(inverse)));
1086
if going_mod >= m {
1087
return inverse & (m - 1);
1088
}
0 commit comments