diff options
| author | roife <roifewu@gmail.com> | 2024-12-25 16:27:09 +0800 |
|---|---|---|
| committer | roife <roifewu@gmail.com> | 2024-12-26 19:51:14 +0800 |
| commit | c17dea99ff72218508830fed48eb3c233fd2c11d (patch) | |
| tree | 3e04b13ae13fa500f97bb18af1706bffde63c800 | |
| parent | 2bfa83beb36e7aa9d55baffa1ab2d076157bba97 (diff) | |
| download | rust-c17dea99ff72218508830fed48eb3c233fd2c11d.tar.gz rust-c17dea99ff72218508830fed48eb3c233fd2c11d.zip | |
fix: await setting config to `not ask before UpdateTest` and format
| -rw-r--r-- | src/tools/rust-analyzer/editors/code/src/commands.ts | 14 |
1 files changed, 7 insertions, 7 deletions
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); } } |
