Skip to content

Commit a960d44

Browse files
committed
matches
1 parent 14d4a9e commit a960d44

File tree

1 file changed

+1
-4
lines changed
  • crates/oxc_formatter/src/write

1 file changed

+1
-4
lines changed

crates/oxc_formatter/src/write/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,10 +1167,7 @@ impl<'a> Format<'a> for AstNode<'a, Vec<'a, TSEnumMember<'a>>> {
11671167
impl<'a> FormatWrite<'a> for AstNode<'a, TSEnumMember<'a>> {
11681168
fn write(&self, f: &mut Formatter<'_, 'a>) -> FormatResult<()> {
11691169
let id = self.id();
1170-
let is_computed = match id.as_ref() {
1171-
TSEnumMemberName::ComputedTemplateString(_) => true,
1172-
_ => false,
1173-
};
1170+
let is_computed = matches!(id.as_ref(), TSEnumMemberName::ComputedTemplateString(_));
11741171

11751172
if is_computed {
11761173
write!(f, "[")?;

0 commit comments

Comments
 (0)