about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYoung-Flash <dongyang@apache.org>2024-01-22 19:33:26 +0800
committerYoung-Flash <dongyang@apache.org>2024-01-22 19:33:26 +0800
commit56f54c87e7ef1bca036d76974a6bc1ccfd593249 (patch)
tree16c1c6d7d005e924b4900c43d86ea740cde27040
parente15f40e8425bea5a225f7b1a7d0492a7ef962a09 (diff)
downloadrust-56f54c87e7ef1bca036d76974a6bc1ccfd593249.tar.gz
rust-56f54c87e7ef1bca036d76974a6bc1ccfd593249.zip
fix lint and fmt
-rw-r--r--editors/code/src/main.ts26
1 files changed, 15 insertions, 11 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index 001d2bbadf3..f532a0ae1af 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -140,7 +140,7 @@ function createCommands(): Record<string, CommandFactory> {
                     health: "stopped",
                 });
             },
-            disabled: (_) => async () => { },
+            disabled: (_) => async () => {},
         },
 
         analyzerStatus: { enabled: commands.analyzerStatus },
@@ -197,24 +197,28 @@ function conflictExtDetect() {
         vscode.window
             .showWarningMessage(
                 `You have both the rust-analyzer (rust-lang.rust-analyzer) and Rust (rust-lang.rust) ` +
-                "plugins enabled. These are known to conflict and cause various functions of " +
-                "both plugins to not work correctly. You should disable one of them.",
-                "Got it"
+                    "plugins enabled. These are known to conflict and cause various functions of " +
+                    "both plugins to not work correctly. You should disable one of them.",
+                "Got it",
             )
-            .then(() => { }, console.error);
+            .then(() => {}, console.error);
     }
 
     if (vscode.extensions.getExtension("panicbit.cargo")) {
-        let isRustAnalyzerCheckOnSave = vscode.workspace.getConfiguration("rust-analyzer").get("checkOnSave");
-        let isCargoAutomaticCheck = vscode.workspace.getConfiguration("cargo").get("automaticCheck");
+        const isRustAnalyzerCheckOnSave = vscode.workspace
+            .getConfiguration("rust-analyzer")
+            .get("checkOnSave");
+        const isCargoAutomaticCheck = vscode.workspace
+            .getConfiguration("cargo")
+            .get("automaticCheck");
         if (isRustAnalyzerCheckOnSave && isCargoAutomaticCheck) {
             vscode.window
                 .showWarningMessage(
                     `You have Cargo (panicbit.cargo) enabled with 'cargo.automaticCheck' set to true(default), ` +
-                    "you can disable it or set {\"cargo.automaticCheck\": false} in settings.json to avoid invoke cargo twice",
-                    "Got it"
+                        'you can disable it or set {"cargo.automaticCheck": false} in settings.json to avoid invoke cargo twice',
+                    "Got it",
                 )
-                .then(() => { }, console.error);
+                .then(() => {}, console.error);
         }
     }
-}
\ No newline at end of file
+}