From 1c4b29c100368d1b0723cc47f2790db832b8dd98 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Wed, 27 Nov 2024 11:11:39 +0000 Subject: [PATCH] refactor(transformer/class-properties): correct comments (#7506) Correct comments. I did too much mindless copy-and-paste. --- .../src/es2022/class_properties/private.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/oxc_transformer/src/es2022/class_properties/private.rs b/crates/oxc_transformer/src/es2022/class_properties/private.rs index 9d2d08e3c5907..2bca885c37c30 100644 --- a/crates/oxc_transformer/src/es2022/class_properties/private.rs +++ b/crates/oxc_transformer/src/es2022/class_properties/private.rs @@ -138,8 +138,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> { ctx: &mut TraverseCtx<'a>, ) { // Unfortunately no way to make compiler see that these branches are provably unreachable. - // This function is much too large inline, because `transform_static_assignment_expression` - // and `transform_instance_assignment_expression` are inlined into it. + // This function is much too large to inline. let Expression::CallExpression(call_expr) = expr else { unreachable!() }; let Expression::PrivateFieldExpression(field_expr) = &mut call_expr.callee else { unreachable!() @@ -229,7 +228,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> { ctx: &mut TraverseCtx<'a>, ) { // Unfortunately no way to make compiler see that these branches are provably unreachable. - // This function is much too large inline, because `transform_static_assignment_expression` + // This function is much too large to inline, because `transform_static_assignment_expression` // and `transform_instance_assignment_expression` are inlined into it. let Expression::AssignmentExpression(assign_expr) = expr else { unreachable!() }; let AssignmentTarget::PrivateFieldExpression(field_expr) = &mut assign_expr.left else { @@ -578,8 +577,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> { ctx: &mut TraverseCtx<'a>, ) { // Unfortunately no way to make compiler see that these branches are provably unreachable. - // This function is much too large inline, because `transform_static_assignment_expression` - // and `transform_instance_assignment_expression` are inlined into it. + // This function is much too large to inline. let Expression::UpdateExpression(update_expr) = expr else { unreachable!() }; let field_expr = match &mut update_expr.argument { SimpleAssignmentTarget::PrivateFieldExpression(field_expr) => field_expr.as_mut(),