From cdfe5a8be01dd7427db734f17c5ec0de7bbe6c80 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 20 Apr 2021 22:54:05 +0300 Subject: fix: no more Registering progress handler for token rustAnalyzer/Indexing failed. --- crates/ide/src/prime_caches.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/ide') diff --git a/crates/ide/src/prime_caches.rs b/crates/ide/src/prime_caches.rs index ea0acfaa0..03597f507 100644 --- a/crates/ide/src/prime_caches.rs +++ b/crates/ide/src/prime_caches.rs @@ -27,6 +27,7 @@ pub(crate) fn prime_caches(db: &RootDatabase, cb: &(dyn Fn(PrimeCachesProgress) let topo = &graph.crates_in_topological_order(); cb(PrimeCachesProgress::Started); + let _d = stdx::defer(|| cb(PrimeCachesProgress::Finished)); // FIXME: This would be easy to parallelize, since it's in the ideal ordering for that. // Unfortunately rayon prevents panics from propagation out of a `scope`, which breaks @@ -41,6 +42,4 @@ pub(crate) fn prime_caches(db: &RootDatabase, cb: &(dyn Fn(PrimeCachesProgress) }); db.crate_def_map(*krate); } - - cb(PrimeCachesProgress::Finished); } -- cgit v1.2.3