mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Code review fixes
Co-Authored-By: Veetaha <veetaha2@gmail.com>
This commit is contained in:
parent
590af37bff
commit
b892a48740
5 changed files with 18 additions and 18 deletions
|
@ -17,9 +17,11 @@ export function activateInlayHints(ctx: Ctx) {
|
|||
) {
|
||||
return this.dispose();
|
||||
}
|
||||
if (!this.updater) this.updater = new HintsUpdater(ctx);
|
||||
|
||||
this.updater.syncCacheAndRenderHints();
|
||||
if (this.updater) {
|
||||
this.updater.syncCacheAndRenderHints();
|
||||
} else {
|
||||
this.updater = new HintsUpdater(ctx);
|
||||
}
|
||||
},
|
||||
dispose() {
|
||||
this.updater?.dispose();
|
||||
|
@ -126,7 +128,7 @@ class HintsUpdater implements Disposable {
|
|||
this.syncCacheAndRenderHints();
|
||||
}
|
||||
|
||||
public syncCacheAndRenderHints() {
|
||||
syncCacheAndRenderHints() {
|
||||
// FIXME: make inlayHints request pass an array of files?
|
||||
this.sourceFiles.forEach((file, uri) => this.fetchHints(file).then(hints => {
|
||||
if (!hints) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue