aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/run.ts
diff options
context:
space:
mode:
authorSahandevs <[email protected]>2021-02-09 14:12:46 +0000
committerSahandevs <[email protected]>2021-02-09 14:12:46 +0000
commit91dd61b9a662caf628a376d1e3b52b56b7ee8d31 (patch)
tree22d5ec3c2abd8058ce97ca9102075427cea02e4a /editors/code/src/run.ts
parent2f82a84d2a06e24296bdbc4e8f50131539d5a749 (diff)
use await instead
Diffstat (limited to 'editors/code/src/run.ts')
-rw-r--r--editors/code/src/run.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/editors/code/src/run.ts b/editors/code/src/run.ts
index 331f85cd3..7ac7ca3cb 100644
--- a/editors/code/src/run.ts
+++ b/editors/code/src/run.ts
@@ -45,8 +45,7 @@ export async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick,
45 if (items.length === 0) { 45 if (items.length === 0) {
46 // it is the debug case, run always has at least 'cargo check ...' 46 // it is the debug case, run always has at least 'cargo check ...'
47 // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_runnables 47 // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_runnables
48 vscode.window.showErrorMessage("There's no debug target!") 48 await vscode.window.showErrorMessage("There's no debug target!");
49 .then(() => { }, console.error);
50 return; 49 return;
51 } 50 }
52 51
@@ -66,8 +65,8 @@ export async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick,
66 disposables.push( 65 disposables.push(
67 quickPick.onDidHide(() => close()), 66 quickPick.onDidHide(() => close()),
68 quickPick.onDidAccept(() => close(quickPick.selectedItems[0])), 67 quickPick.onDidAccept(() => close(quickPick.selectedItems[0])),
69 quickPick.onDidTriggerButton((_button) => { 68 quickPick.onDidTriggerButton(async (_button) => {
70 makeDebugConfig(ctx, quickPick.activeItems[0].runnable).catch(console.error); 69 await makeDebugConfig(ctx, quickPick.activeItems[0].runnable);
71 close(); 70 close();
72 }), 71 }),
73 quickPick.onDidChangeActive((active) => { 72 quickPick.onDidChangeActive((active) => {