Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 82083fb

Browse files
committed
Refactor _restartLanguageServers async/await
1 parent 322d3f4 commit 82083fb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,9 @@ class RustLanguageClient extends AutoLanguageClient {
242242
}
243243

244244
/** @param {?string} reason Reason for the restart shown in the notification */
245-
_restartLanguageServers(reason) {
246-
this.restartAllServers().then(() => reason && atom.notifications.addSuccess(reason, { _src: 'ide-rust' }))
245+
async _restartLanguageServers(reason) {
246+
await this.restartAllServers()
247+
if (reason) atom.notifications.addSuccess(reason, { _src: 'ide-rust' })
247248
}
248249

249250
// check for toolchain updates if installed & not dated

0 commit comments

Comments
 (0)