From 3a315353545c408fb5d7a03e518a1cec0ba79c93 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:50:05 +0000 Subject: [PATCH] refactor(semantic): shorten code (#7277) Tiny refactor. No need for `matches!` here. --- crates/oxc_semantic/src/binder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_semantic/src/binder.rs b/crates/oxc_semantic/src/binder.rs index 693f8fe0fc82c7..6e0c1888a2565f 100644 --- a/crates/oxc_semantic/src/binder.rs +++ b/crates/oxc_semantic/src/binder.rs @@ -395,7 +395,7 @@ impl<'a> Binder<'a> for TSEnumMember<'a> { impl<'a> Binder<'a> for TSModuleDeclaration<'a> { fn bind(&self, builder: &mut SemanticBuilder) { // do not bind `global` for `declare global { ... }` - if matches!(self.kind, TSModuleDeclarationKind::Global) { + if self.kind == TSModuleDeclarationKind::Global { return; }