@@ -394,7 +394,7 @@ impl<'a, C: Comments> ServerActions<'a, C> {
394394 }
395395
396396 let action_name = self . gen_action_ident ( ) ;
397- let action_ident = Ident :: new ( action_name. clone ( ) , arrow. span , self . private_ctxt ) ;
397+ let action_ident = Ident :: new ( action_name, arrow. span , self . private_ctxt ) ;
398398 let action_id = self . generate_server_reference_id (
399399 & ModuleExportName :: Ident ( action_ident. clone ( ) ) ,
400400 Some ( & new_params) ,
@@ -524,17 +524,17 @@ impl<'a, C: Comments> ServerActions<'a, C> {
524524 } ) ) ) ;
525525
526526 if ids_from_closure. is_empty ( ) {
527- Expr :: Ident ( action_ident. clone ( ) )
527+ Expr :: Ident ( action_ident)
528528 } else {
529529 self . has_server_reference_with_bound_args = true ;
530530 bind_args_to_ident (
531- action_ident. clone ( ) ,
531+ action_ident,
532532 ids_from_closure
533533 . iter ( )
534534 . cloned ( )
535535 . map ( |id| Some ( id. as_arg ( ) ) )
536536 . collect ( ) ,
537- action_id. clone ( ) ,
537+ action_id,
538538 )
539539 }
540540 }
@@ -559,7 +559,7 @@ impl<'a, C: Comments> ServerActions<'a, C> {
559559 new_params. append ( & mut function. params ) ;
560560
561561 let action_name: Atom = self . gen_action_ident ( ) ;
562- let mut action_ident = Ident :: new ( action_name. clone ( ) , function. span , self . private_ctxt ) ;
562+ let mut action_ident = Ident :: new ( action_name, function. span , self . private_ctxt ) ;
563563 if action_ident. span . lo == self . start_pos {
564564 action_ident. span = Span :: dummy_with_cmt ( ) ;
565565 }
@@ -668,17 +668,17 @@ impl<'a, C: Comments> ServerActions<'a, C> {
668668 } ) ) ) ;
669669
670670 if ids_from_closure. is_empty ( ) {
671- Expr :: Ident ( action_ident. clone ( ) )
671+ Expr :: Ident ( action_ident)
672672 } else {
673673 self . has_server_reference_with_bound_args = true ;
674674 bind_args_to_ident (
675- action_ident. clone ( ) ,
675+ action_ident,
676676 ids_from_closure
677677 . iter ( )
678678 . cloned ( )
679679 . map ( |id| Some ( id. as_arg ( ) ) )
680680 . collect ( ) ,
681- action_id. clone ( ) ,
681+ action_id,
682682 )
683683 }
684684 }
@@ -716,7 +716,7 @@ impl<'a, C: Comments> ServerActions<'a, C> {
716716 self . server_reference_exports . push ( ServerReferenceExport {
717717 ident : fn_name. clone ( ) ,
718718 export_name : export_name. clone ( ) ,
719- reference_id : reference_id . clone ( ) ,
719+ reference_id,
720720 } ) ;
721721 } else if self . is_default_export ( ) {
722722 let action_ident = Ident :: new ( self . gen_action_ident ( ) , span, self . private_ctxt ) ;
@@ -730,7 +730,7 @@ impl<'a, C: Comments> ServerActions<'a, C> {
730730 self . server_reference_exports . push ( ServerReferenceExport {
731731 ident : action_ident. clone ( ) ,
732732 export_name : export_name. clone ( ) ,
733- reference_id : reference_id . clone ( ) ,
733+ reference_id,
734734 } ) ;
735735
736736 // For the server layer, also hoist the function and rewrite the default export.
@@ -825,8 +825,8 @@ impl<'a, C: Comments> VisitMut for ServerActions<'a, C> {
825825
826826 self . server_reference_exports . push ( ServerReferenceExport {
827827 ident : action_ident. clone ( ) ,
828- export_name : export_name . clone ( ) ,
829- reference_id : action_id. clone ( ) ,
828+ export_name,
829+ reference_id : action_id,
830830 } ) ;
831831
832832 self
@@ -1146,7 +1146,7 @@ impl<'a, C: Comments> VisitMut for ServerActions<'a, C> {
11461146 self . rewrite_expr_to_proxy_expr = None ;
11471147 self . current_export_name = None ;
11481148 n. visit_mut_children_with ( self ) ;
1149- self . current_export_name = old_current_export_name. clone ( ) ;
1149+ self . current_export_name = old_current_export_name;
11501150 self . this_status = old_this_status;
11511151
11521152 if let Some ( expr) = self . rewrite_expr_to_proxy_expr . take ( ) {
@@ -2072,7 +2072,7 @@ fn annotate_ident_as_server_reference(ident: Ident, action_id: Atom, original_sp
20722072 } ,
20732073 ExprOrSpread {
20742074 spread: None ,
2075- expr: Box :: new( action_id. clone ( ) . into( ) ) ,
2075+ expr: Box :: new( action_id. into( ) ) ,
20762076 } ,
20772077 ExprOrSpread {
20782078 spread: None ,
0 commit comments