mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
style(syntax): improve formatting (#7349)
Style nit. Adjust formatting.
This commit is contained in:
parent
bf839c1dfa
commit
b5a202711c
1 changed files with 13 additions and 6 deletions
|
|
@ -78,16 +78,20 @@ impl AssignmentOperator {
|
||||||
/// Returns `true` for `+=`, `-=`, `*=`, `/=`, `%=`, and `**=`.
|
/// Returns `true` for `+=`, `-=`, `*=`, `/=`, `%=`, and `**=`.
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
pub fn is_arithmetic(self) -> bool {
|
pub fn is_arithmetic(self) -> bool {
|
||||||
matches!(self, Self::Addition | Self::Subtraction | Self::Multiplication
|
matches!(
|
||||||
| Self::Division | Self::Remainder | Self::Exponential
|
self,
|
||||||
|
Self::Addition | Self::Subtraction | Self::Multiplication
|
||||||
|
| Self::Division | Self::Remainder | Self::Exponential
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `true` for `|=`, `^=`, `&=`, `<<=`, `>>=`, and `>>>=`.
|
/// Returns `true` for `|=`, `^=`, `&=`, `<<=`, `>>=`, and `>>>=`.
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
pub fn is_bitwise(self) -> bool {
|
pub fn is_bitwise(self) -> bool {
|
||||||
matches!(self, Self::BitwiseOR | Self::BitwiseXOR | Self::BitwiseAnd
|
matches!(
|
||||||
| Self::ShiftLeft | Self::ShiftRight | Self::ShiftRightZeroFill
|
self,
|
||||||
|
Self::BitwiseOR | Self::BitwiseXOR | Self::BitwiseAnd
|
||||||
|
| Self::ShiftLeft | Self::ShiftRight | Self::ShiftRightZeroFill
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -209,8 +213,11 @@ impl BinaryOperator {
|
||||||
/// Returns `true` for arithmetic operators
|
/// Returns `true` for arithmetic operators
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
pub fn is_arithmetic(self) -> bool {
|
pub fn is_arithmetic(self) -> bool {
|
||||||
matches!(self, Self::Addition | Self::Subtraction | Self::Multiplication
|
matches!(
|
||||||
| Self::Division | Self::Remainder | Self::Exponential)
|
self,
|
||||||
|
Self::Addition | Self::Subtraction | Self::Multiplication
|
||||||
|
| Self::Division | Self::Remainder | Self::Exponential
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `true` for multiplication (`*`), division (`/`), and remainder
|
/// Returns `true` for multiplication (`*`), division (`/`), and remainder
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue