@@ -70,13 +70,13 @@ impl WorkspaceWorker {
7070
7171 /// Start all programs (linter, formatter) for the worker.
7272 /// This should be called after the client has sent the workspace configuration.
73- pub async fn start_worker ( & self , options : & serde_json:: Value ) {
73+ pub async fn start_worker ( & self , options : serde_json:: Value ) {
7474 * self . options . lock ( ) . await = Some ( options. clone ( ) ) ;
7575 * self . server_linter . write ( ) . await =
7676 Some ( ServerLinterBuilder :: new ( self . root_uri . clone ( ) , options. clone ( ) ) . build ( ) ) ;
7777
7878 * self . server_formatter . write ( ) . await =
79- ServerFormatterBuilder :: new ( self . root_uri . clone ( ) , options. clone ( ) ) . build ( ) ;
79+ ServerFormatterBuilder :: new ( self . root_uri . clone ( ) , options) . build ( ) ;
8080 }
8181
8282 /// Initialize file system watchers for the workspace.
@@ -551,7 +551,7 @@ mod test_watchers {
551551 }
552552
553553 impl Tester {
554- pub fn new ( relative_root_dir : & ' static str , options : & serde_json:: Value ) -> Self {
554+ pub fn new ( relative_root_dir : & ' static str , options : serde_json:: Value ) -> Self {
555555 let absolute_path =
556556 std:: env:: current_dir ( ) . expect ( "could not get current dir" ) . join ( relative_root_dir) ;
557557 let uri =
@@ -566,7 +566,7 @@ mod test_watchers {
566566
567567 async fn create_workspace_worker (
568568 absolute_path : Uri ,
569- options : & serde_json:: Value ,
569+ options : serde_json:: Value ,
570570 ) -> WorkspaceWorker {
571571 let worker = WorkspaceWorker :: new ( absolute_path) ;
572572 worker. start_worker ( options) . await ;
@@ -628,7 +628,7 @@ mod test_watchers {
628628
629629 #[ test]
630630 fn test_default_options ( ) {
631- let tester = Tester :: new ( "fixtures/watcher/default" , & json ! ( { } ) ) ;
631+ let tester = Tester :: new ( "fixtures/watcher/default" , json ! ( { } ) ) ;
632632 let registrations = tester. init_watchers ( ) ;
633633
634634 assert_eq ! ( registrations. len( ) , 1 ) ;
@@ -639,7 +639,7 @@ mod test_watchers {
639639 fn test_custom_config_path ( ) {
640640 let tester = Tester :: new (
641641 "fixtures/watcher/default" ,
642- & json ! ( {
642+ json ! ( {
643643 "configPath" : "configs/lint.json"
644644 } ) ,
645645 ) ;
@@ -651,7 +651,7 @@ mod test_watchers {
651651
652652 #[ test]
653653 fn test_linter_extends_configs ( ) {
654- let tester = Tester :: new ( "fixtures/watcher/linter_extends" , & json ! ( { } ) ) ;
654+ let tester = Tester :: new ( "fixtures/watcher/linter_extends" , json ! ( { } ) ) ;
655655 let registrations = tester. init_watchers ( ) ;
656656
657657 // The `.oxlintrc.json` extends `./lint.json -> 2 watchers
@@ -667,7 +667,7 @@ mod test_watchers {
667667 fn test_linter_extends_custom_config_path ( ) {
668668 let tester = Tester :: new (
669669 "fixtures/watcher/linter_extends" ,
670- & json ! ( {
670+ json ! ( {
671671 "configPath" : ".oxlintrc.json"
672672 } ) ,
673673 ) ;
@@ -685,7 +685,7 @@ mod test_watchers {
685685 fn test_formatter_experimental_enabled ( ) {
686686 let tester = Tester :: new (
687687 "fixtures/watcher/default" ,
688- & json ! ( {
688+ json ! ( {
689689 "fmt.experimental" : true
690690 } ) ,
691691 ) ;
@@ -704,7 +704,7 @@ mod test_watchers {
704704 fn test_formatter_custom_config_path ( ) {
705705 let tester = Tester :: new (
706706 "fixtures/watcher/default" ,
707- & json ! ( {
707+ json ! ( {
708708 "fmt.experimental" : true ,
709709 "fmt.configPath" : "configs/formatter.json"
710710 } ) ,
@@ -720,7 +720,7 @@ mod test_watchers {
720720 fn test_linter_and_formatter_custom_config_path ( ) {
721721 let tester = Tester :: new (
722722 "fixtures/watcher/default" ,
723- & json ! ( {
723+ json ! ( {
724724 "configPath" : "configs/lint.json" ,
725725 "fmt.experimental" : true ,
726726 "fmt.configPath" : "configs/formatter.json"
@@ -742,15 +742,15 @@ mod test_watchers {
742742
743743 #[ test]
744744 fn test_no_change ( ) {
745- let tester = Tester :: new ( "fixtures/watcher/default" , & json ! ( { } ) ) ;
745+ let tester = Tester :: new ( "fixtures/watcher/default" , json ! ( { } ) ) ;
746746 let ( registration, unregistrations) = tester. did_change_configuration ( json ! ( { } ) ) ;
747747 assert ! ( registration. is_empty( ) ) ;
748748 assert ! ( unregistrations. is_empty( ) ) ;
749749 }
750750
751751 #[ test]
752752 fn test_lint_config_path_change ( ) {
753- let tester = Tester :: new ( "fixtures/watcher/default" , & json ! ( { } ) ) ;
753+ let tester = Tester :: new ( "fixtures/watcher/default" , json ! ( { } ) ) ;
754754 let ( registration, unregistrations) = tester. did_change_configuration ( json ! ( {
755755 "configPath" : "configs/lint.json"
756756 } ) ) ;
@@ -770,7 +770,7 @@ mod test_watchers {
770770
771771 #[ test]
772772 fn test_lint_other_option_change ( ) {
773- let tester = Tester :: new ( "fixtures/watcher/default" , & json ! ( { } ) ) ;
773+ let tester = Tester :: new ( "fixtures/watcher/default" , json ! ( { } ) ) ;
774774 let ( registration, unregistrations) = tester. did_change_configuration ( json ! ( {
775775 // run is the only option that does not require a restart
776776 "run" : "onSave"
@@ -783,7 +783,7 @@ mod test_watchers {
783783 fn test_no_changes_with_formatter ( ) {
784784 let tester = Tester :: new (
785785 "fixtures/watcher/default" ,
786- & json ! ( {
786+ json ! ( {
787787 "fmt.experimental" : true ,
788788 } ) ,
789789 ) ;
@@ -799,7 +799,7 @@ mod test_watchers {
799799 fn test_lint_config_path_change_with_formatter ( ) {
800800 let tester = Tester :: new (
801801 "fixtures/watcher/default" ,
802- & json ! ( {
802+ json ! ( {
803803 "fmt.experimental" : true
804804 } ) ,
805805 ) ;
@@ -821,7 +821,7 @@ mod test_watchers {
821821
822822 #[ test]
823823 fn test_formatter_experimental_enabled ( ) {
824- let tester = Tester :: new ( "fixtures/watcher/default" , & json ! ( { } ) ) ;
824+ let tester = Tester :: new ( "fixtures/watcher/default" , json ! ( { } ) ) ;
825825 let ( registration, unregistrations) = tester. did_change_configuration ( json ! ( {
826826 "fmt.experimental" : true
827827 } ) ) ;
@@ -839,7 +839,7 @@ mod test_watchers {
839839 fn test_formatter_custom_config_path ( ) {
840840 let tester = Tester :: new (
841841 "fixtures/watcher/default" ,
842- & json ! ( {
842+ json ! ( {
843843 "fmt.experimental" : true
844844 } ) ,
845845 ) ;
@@ -869,7 +869,7 @@ mod test_watchers {
869869 fn test_formatter_disabling ( ) {
870870 let tester = Tester :: new (
871871 "fixtures/watcher/default" ,
872- & json ! ( {
872+ json ! ( {
873873 "fmt.experimental" : true
874874 } ) ,
875875 ) ;
0 commit comments