refactor(ast): shorten code in AST builder (#3835)

Shorten code in AST builder. `MemberExpression` can be converted
directly to `AssignmentTarget`.
This commit is contained in:
overlookmotel 2024-06-23 03:47:15 +01:00 committed by GitHub
parent 120696741c
commit a6487482bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -575,7 +575,7 @@ impl<'a> AstBuilder<'a> {
self,
expr: MemberExpression<'a>,
) -> AssignmentTarget<'a> {
AssignmentTarget::from(SimpleAssignmentTarget::from(expr))
AssignmentTarget::from(expr)
}
#[inline]