Skip to content

Commit 5f8cf71

Browse files
committed
Manually format functions and use rhs instead of v from my CE testing
1 parent 700af56 commit 5f8cf71

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

Diff for: core/src/num/int_macros.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -1329,11 +1329,11 @@ macro_rules! int_impl {
13291329
#[must_use = "this returns the result of the operation, \
13301330
without modifying the original"]
13311331
#[inline]
1332-
pub const fn unbounded_shl(self, v: u32) -> $SelfT{
1333-
if v < Self::BITS{
1332+
pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{
1333+
if rhs < Self::BITS{
13341334
// SAFETY:
1335-
// v is just checked to be in-range above
1336-
unsafe{self.unchecked_shl(v)}
1335+
// rhs is just checked to be in-range above
1336+
unsafe { self.unchecked_shl(rhs) }
13371337
}else{
13381338
0
13391339
}
@@ -1456,17 +1456,17 @@ macro_rules! int_impl {
14561456
#[must_use = "this returns the result of the operation, \
14571457
without modifying the original"]
14581458
#[inline]
1459-
pub const fn unbounded_shr(self, v: u32) -> $SelfT{
1460-
if v < Self::BITS{
1459+
pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{
1460+
if rhs < Self::BITS{
14611461
// SAFETY:
1462-
// v is just checked to be in-range above
1463-
unsafe{self.unchecked_shr(v)}
1462+
// rhs is just checked to be in-range above
1463+
unsafe { self.unchecked_shr(rhs) }
14641464
}else{
14651465
// A shift by `Self::BITS-1` suffices for signed integers, because the sign bit is copied for each of the shifted bits.
14661466

14671467
// SAFETY:
14681468
// `Self::BITS-1` is guaranteed to be less than `Self::BITS`
1469-
unsafe{self.unchecked_shr(Self::BITS - 1)}
1469+
unsafe { self.unchecked_shr(Self::BITS - 1) }
14701470
}
14711471
}
14721472

Diff for: core/src/num/uint_macros.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1518,11 +1518,11 @@ macro_rules! uint_impl {
15181518
#[must_use = "this returns the result of the operation, \
15191519
without modifying the original"]
15201520
#[inline]
1521-
pub const fn unbounded_shl(self, v: u32) -> $SelfT{
1522-
if v < Self::BITS{
1521+
pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{
1522+
if rhs < Self::BITS{
15231523
// SAFETY:
1524-
// v is just checked to be in-range above
1525-
unsafe{self.unchecked_shl(v)}
1524+
// rhs is just checked to be in-range above
1525+
unsafe { self.unchecked_shl(rhs) }
15261526
}else{
15271527
0
15281528
}
@@ -1643,11 +1643,11 @@ macro_rules! uint_impl {
16431643
#[must_use = "this returns the result of the operation, \
16441644
without modifying the original"]
16451645
#[inline]
1646-
pub const fn unbounded_shr(self, v: u32) -> $SelfT{
1647-
if v < Self::BITS{
1646+
pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{
1647+
if rhs < Self::BITS{
16481648
// SAFETY:
1649-
// v is just checked to be in-range above
1650-
unsafe{self.unchecked_shr(v)}
1649+
// rhs is just checked to be in-range above
1650+
unsafe { self.unchecked_shr(rhs) }
16511651
}else{
16521652
0
16531653
}

0 commit comments

Comments
 (0)