mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
refactor(transformer/jsx): return &mut T not &mut ArenaBox<T> (#7001)
`&mut ArenaBox<T>` is a double-reference. `&mut T` is shorter and easier to read.
This commit is contained in:
parent
ae226710f2
commit
e5ecbb9bf1
1 changed files with 1 additions and 2 deletions
|
|
@ -45,7 +45,6 @@
|
|||
//!
|
||||
//! * Babel plugin implementation: <https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-react-display-name/src/index.ts>
|
||||
|
||||
use oxc_allocator::Box as ArenaBox;
|
||||
use oxc_ast::ast::*;
|
||||
use oxc_span::{Atom, SPAN};
|
||||
use oxc_traverse::{Ancestor, Traverse, TraverseCtx};
|
||||
|
|
@ -133,7 +132,7 @@ impl<'a, 'ctx> ReactDisplayName<'a, 'ctx> {
|
|||
/// Get the object from `React.createClass({})` or `createReactClass({})`
|
||||
fn get_object_from_create_class<'b>(
|
||||
call_expr: &'b mut CallExpression<'a>,
|
||||
) -> Option<&'b mut ArenaBox<'a, ObjectExpression<'a>>> {
|
||||
) -> Option<&'b mut ObjectExpression<'a>> {
|
||||
if match &call_expr.callee {
|
||||
callee @ match_member_expression!(Expression) => {
|
||||
!callee.to_member_expression().is_specific_member_access("React", "createClass")
|
||||
|
|
|
|||
Loading…
Reference in a new issue