mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
use await instead
This commit is contained in:
parent
2f82a84d2a
commit
91dd61b9a6
4 changed files with 21 additions and 31 deletions
|
@ -45,8 +45,7 @@ export async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick,
|
|||
if (items.length === 0) {
|
||||
// it is the debug case, run always has at least 'cargo check ...'
|
||||
// see crates\rust-analyzer\src\main_loop\handlers.rs, handle_runnables
|
||||
vscode.window.showErrorMessage("There's no debug target!")
|
||||
.then(() => { }, console.error);
|
||||
await vscode.window.showErrorMessage("There's no debug target!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -66,8 +65,8 @@ export async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick,
|
|||
disposables.push(
|
||||
quickPick.onDidHide(() => close()),
|
||||
quickPick.onDidAccept(() => close(quickPick.selectedItems[0])),
|
||||
quickPick.onDidTriggerButton((_button) => {
|
||||
makeDebugConfig(ctx, quickPick.activeItems[0].runnable).catch(console.error);
|
||||
quickPick.onDidTriggerButton(async (_button) => {
|
||||
await makeDebugConfig(ctx, quickPick.activeItems[0].runnable);
|
||||
close();
|
||||
}),
|
||||
quickPick.onDidChangeActive((active) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue