Skip to content

Commit

Permalink
style(syntax): improve formatting (#7349)
Browse files Browse the repository at this point in the history
Style nit. Adjust formatting.
  • Loading branch information
overlookmotel committed Nov 18, 2024
1 parent bf839c1 commit b5a2027
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions crates/oxc_syntax/src/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b5a2027

Please sign in to comment.