style(syntax): improve formatting (#7349)

Style nit. Adjust formatting.
This commit is contained in:
overlookmotel 2024-11-18 22:26:30 +00:00
parent bf839c1dfa
commit b5a202711c

View file

@ -78,16 +78,20 @@ impl AssignmentOperator {
/// Returns `true` for `+=`, `-=`, `*=`, `/=`, `%=`, and `**=`.
#[rustfmt::skip]
pub fn is_arithmetic(self) -> bool {
matches!(self, Self::Addition | Self::Subtraction | Self::Multiplication
| Self::Division | Self::Remainder | Self::Exponential
matches!(
self,
Self::Addition | Self::Subtraction | Self::Multiplication
| Self::Division | Self::Remainder | Self::Exponential
)
}
/// Returns `true` for `|=`, `^=`, `&=`, `<<=`, `>>=`, and `>>>=`.
#[rustfmt::skip]
pub fn is_bitwise(self) -> bool {
matches!(self, Self::BitwiseOR | Self::BitwiseXOR | Self::BitwiseAnd
| Self::ShiftLeft | Self::ShiftRight | Self::ShiftRightZeroFill
matches!(
self,
Self::BitwiseOR | Self::BitwiseXOR | Self::BitwiseAnd
| Self::ShiftLeft | Self::ShiftRight | Self::ShiftRightZeroFill
)
}
@ -209,8 +213,11 @@ impl BinaryOperator {
/// Returns `true` for arithmetic operators
#[rustfmt::skip]
pub fn is_arithmetic(self) -> bool {
matches!(self, Self::Addition | Self::Subtraction | Self::Multiplication
| Self::Division | Self::Remainder | Self::Exponential)
matches!(
self,
Self::Addition | Self::Subtraction | Self::Multiplication
| Self::Division | Self::Remainder | Self::Exponential
)
}
/// Returns `true` for multiplication (`*`), division (`/`), and remainder