diff options
author | Tetsuharu OHZEKI <[email protected]> | 2019-12-11 15:49:54 +0000 |
---|---|---|
committer | Tetsuharu OHZEKI <[email protected]> | 2019-12-11 16:11:53 +0000 |
commit | 0e9cabab3fb4c15fb1b88e62a35ccf1ea52ef853 (patch) | |
tree | df588536859ad9c0605492c75a8ffce5d3977df6 /editors/code/src/commands | |
parent | b21bb44c8dcd43e9e42ef7e3d752dd550e6505ad (diff) |
Enable noImplicitReturns option for vscode extension
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r-- | editors/code/src/commands/runnables.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts index c81d7ce0f..cf980e257 100644 --- a/editors/code/src/commands/runnables.ts +++ b/editors/code/src/commands/runnables.ts | |||
@@ -73,7 +73,7 @@ function createTask(spec: Runnable): vscode.Task { | |||
73 | } | 73 | } |
74 | 74 | ||
75 | let prevRunnable: RunnableQuickPick | undefined; | 75 | let prevRunnable: RunnableQuickPick | undefined; |
76 | export async function handle() { | 76 | export async function handle(): Promise<vscode.TaskExecution | undefined> { |
77 | const editor = vscode.window.activeTextEditor; | 77 | const editor = vscode.window.activeTextEditor; |
78 | if (editor == null || editor.document.languageId !== 'rust') { | 78 | if (editor == null || editor.document.languageId !== 'rust') { |
79 | return; | 79 | return; |
@@ -105,12 +105,14 @@ export async function handle() { | |||
105 | items.push(new RunnableQuickPick(r)); | 105 | items.push(new RunnableQuickPick(r)); |
106 | } | 106 | } |
107 | const item = await vscode.window.showQuickPick(items); | 107 | const item = await vscode.window.showQuickPick(items); |
108 | if (item) { | 108 | if (!item) { |
109 | item.detail = 'rerun'; | 109 | return; |
110 | prevRunnable = item; | ||
111 | const task = createTask(item.runnable); | ||
112 | return await vscode.tasks.executeTask(task); | ||
113 | } | 110 | } |
111 | |||
112 | item.detail = 'rerun'; | ||
113 | prevRunnable = item; | ||
114 | const task = createTask(item.runnable); | ||
115 | return await vscode.tasks.executeTask(task); | ||
114 | } | 116 | } |
115 | 117 | ||
116 | export async function handleSingle(runnable: Runnable) { | 118 | export async function handleSingle(runnable: Runnable) { |