From c17dea99ff72218508830fed48eb3c233fd2c11d Mon Sep 17 00:00:00 2001 From: roife Date: Wed, 25 Dec 2024 16:27:09 +0800 Subject: fix: await setting config to `not ask before UpdateTest` and format --- src/tools/rust-analyzer/editors/code/src/commands.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/tools/rust-analyzer/editors/code') diff --git a/src/tools/rust-analyzer/editors/code/src/commands.ts b/src/tools/rust-analyzer/editors/code/src/commands.ts index dc35fddf49e..a4b53730ad5 100644 --- a/src/tools/rust-analyzer/editors/code/src/commands.ts +++ b/src/tools/rust-analyzer/editors/code/src/commands.ts @@ -1155,18 +1155,18 @@ export function runSingle(ctx: CtxInit): Cmd { if (isUpdatingTest(runnable) && ctx.config.askBeforeUpdateTest) { const selection = await vscode.window.showInformationMessage( - 'rust-analyzer', - { detail: 'Do you want to update tests?', modal: true }, - 'Update Now', - 'Update (and Don\'t ask again)', + "rust-analyzer", + { detail: "Do you want to update tests?", modal: true }, + "Update Now", + "Update (and Don't ask again)", ); - if (selection !== 'Update Now' && selection !== 'Update (and Don\'t ask again)') { + if (selection !== "Update Now" && selection !== "Update (and Don't ask again)") { return; } - if (selection === 'Update (and Don\'t ask again)') { - ctx.config.setAskBeforeUpdateTest(false); + if (selection === "Update (and Don't ask again)") { + await ctx.config.setAskBeforeUpdateTest(false); } } -- cgit 1.4.1-3-g733a5