From cd69307aeeaa6996e782359f503666e5d7b64a25 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 2 May 2021 21:45:00 +0300 Subject: fix: don't duplicate Progerss::Finised for cache priming --- crates/ide/src/prime_caches.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ide/src') diff --git a/crates/ide/src/prime_caches.rs b/crates/ide/src/prime_caches.rs index 03597f507..d912a01b8 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); + // Take care to emit the finish signal even when the computation is canceled. let _d = stdx::defer(|| cb(PrimeCachesProgress::Finished)); // FIXME: This would be easy to parallelize, since it's in the ideal ordering for that. -- cgit v1.2.3