Manually format functions and use rhs instead of v from my CE testing

This commit is contained in:
Connor Horman 2024-08-21 21:16:18 +00:00
parent 9b5a004bf8
commit c89bae0ea8
2 changed files with 17 additions and 17 deletions

View File

@ -1329,11 +1329,11 @@ pub const fn strict_shl(self, rhs: u32) -> Self {
#[must_use = "this returns the result of the operation, \ #[must_use = "this returns the result of the operation, \
without modifying the original"] without modifying the original"]
#[inline] #[inline]
pub const fn unbounded_shl(self, v: u32) -> $SelfT{ pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{
if v < Self::BITS{ if rhs < Self::BITS{
// SAFETY: // SAFETY:
// v is just checked to be in-range above // rhs is just checked to be in-range above
unsafe{self.unchecked_shl(v)} unsafe { self.unchecked_shl(rhs) }
}else{ }else{
0 0
} }
@ -1456,11 +1456,11 @@ pub const fn strict_shr(self, rhs: u32) -> Self {
#[must_use = "this returns the result of the operation, \ #[must_use = "this returns the result of the operation, \
without modifying the original"] without modifying the original"]
#[inline] #[inline]
pub const fn unbounded_shr(self, v: u32) -> $SelfT{ pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{
if v < Self::BITS{ if rhs < Self::BITS{
// SAFETY: // SAFETY:
// v is just checked to be in-range above // rhs is just checked to be in-range above
unsafe{self.unchecked_shr(v)} unsafe { self.unchecked_shr(rhs) }
}else{ }else{
// A shift by `Self::BITS-1` suffices for signed integers, because the sign bit is copied for each of the shifted bits. // A shift by `Self::BITS-1` suffices for signed integers, because the sign bit is copied for each of the shifted bits.

View File

@ -1518,11 +1518,11 @@ pub const fn strict_shl(self, rhs: u32) -> Self {
#[must_use = "this returns the result of the operation, \ #[must_use = "this returns the result of the operation, \
without modifying the original"] without modifying the original"]
#[inline] #[inline]
pub const fn unbounded_shl(self, v: u32) -> $SelfT{ pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{
if v < Self::BITS{ if rhs < Self::BITS{
// SAFETY: // SAFETY:
// v is just checked to be in-range above // rhs is just checked to be in-range above
unsafe{self.unchecked_shl(v)} unsafe { self.unchecked_shl(rhs) }
}else{ }else{
0 0
} }
@ -1643,11 +1643,11 @@ pub const fn strict_shr(self, rhs: u32) -> Self {
#[must_use = "this returns the result of the operation, \ #[must_use = "this returns the result of the operation, \
without modifying the original"] without modifying the original"]
#[inline] #[inline]
pub const fn unbounded_shr(self, v: u32) -> $SelfT{ pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{
if v < Self::BITS{ if rhs < Self::BITS{
// SAFETY: // SAFETY:
// v is just checked to be in-range above // rhs is just checked to be in-range above
unsafe{self.unchecked_shr(v)} unsafe { self.unchecked_shr(rhs) }
}else{ }else{
0 0
} }