mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Enable noImplicitReturns option for vscode extension
This commit is contained in:
parent
b21bb44c8d
commit
0e9cabab3f
5 changed files with 20 additions and 12 deletions
|
@ -73,7 +73,7 @@ function createTask(spec: Runnable): vscode.Task {
|
|||
}
|
||||
|
||||
let prevRunnable: RunnableQuickPick | undefined;
|
||||
export async function handle() {
|
||||
export async function handle(): Promise<vscode.TaskExecution | undefined> {
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
if (editor == null || editor.document.languageId !== 'rust') {
|
||||
return;
|
||||
|
@ -105,12 +105,14 @@ export async function handle() {
|
|||
items.push(new RunnableQuickPick(r));
|
||||
}
|
||||
const item = await vscode.window.showQuickPick(items);
|
||||
if (item) {
|
||||
item.detail = 'rerun';
|
||||
prevRunnable = item;
|
||||
const task = createTask(item.runnable);
|
||||
return await vscode.tasks.executeTask(task);
|
||||
if (!item) {
|
||||
return;
|
||||
}
|
||||
|
||||
item.detail = 'rerun';
|
||||
prevRunnable = item;
|
||||
const task = createTask(item.runnable);
|
||||
return await vscode.tasks.executeTask(task);
|
||||
}
|
||||
|
||||
export async function handleSingle(runnable: Runnable) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue