fix: Fix formatting requests hanging when r-a is still starting

The reason for that was that we were calculating the crate defmaps
of the file we are saving by accident causing us to get stuck waiting
on their expensive computation, while we only need the relevant crate
id.
This commit is contained in:
Lukas Wirth 2022-10-17 17:53:50 +02:00
parent 40cbeb5b3d
commit a762baca02
8 changed files with 17 additions and 24 deletions

View file

@ -45,7 +45,7 @@ pub(crate) fn status(db: &RootDatabase, file_id: Option<FileId>) -> String {
if let Some(file_id) = file_id {
format_to!(buf, "\nFile info:\n");
let crates = crate::parent_module::crate_for(db, file_id);
let crates = crate::parent_module::crates_for(db, file_id);
if crates.is_empty() {
format_to!(buf, "Does not belong to any crate");
}