mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
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:
parent
40cbeb5b3d
commit
a762baca02
8 changed files with 17 additions and 24 deletions
|
@ -482,8 +482,8 @@ impl Analysis {
|
|||
}
|
||||
|
||||
/// Returns crates this file belongs too.
|
||||
pub fn crate_for(&self, file_id: FileId) -> Cancellable<Vec<CrateId>> {
|
||||
self.with_db(|db| parent_module::crate_for(db, file_id))
|
||||
pub fn crates_for(&self, file_id: FileId) -> Cancellable<Vec<CrateId>> {
|
||||
self.with_db(|db| parent_module::crates_for(db, file_id))
|
||||
}
|
||||
|
||||
/// Returns the edition of the given crate.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue