mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Apply suggested changes
This commit is contained in:
parent
29e5cdfb05
commit
23a5f31ff4
18 changed files with 1878 additions and 299 deletions
|
@ -273,10 +273,17 @@ impl Analysis {
|
|||
self.with_db(|db| status::status(db, file_id))
|
||||
}
|
||||
|
||||
pub fn source_root(&self, file_id: FileId) -> Cancellable<SourceRootId> {
|
||||
pub fn source_root_id(&self, file_id: FileId) -> Cancellable<SourceRootId> {
|
||||
self.with_db(|db| db.file_source_root(file_id))
|
||||
}
|
||||
|
||||
pub fn is_local_source_root(&self, source_root_id: SourceRootId) -> Cancellable<bool> {
|
||||
self.with_db(|db| {
|
||||
let sr = db.source_root(source_root_id);
|
||||
!sr.is_library
|
||||
})
|
||||
}
|
||||
|
||||
pub fn parallel_prime_caches<F>(&self, num_worker_threads: u8, cb: F) -> Cancellable<()>
|
||||
where
|
||||
F: Fn(ParallelPrimeCachesProgress) + Sync + std::panic::UnwindSafe,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue