mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-01 12:24:29 +00:00
refactor: Clean up cache priming cancellation handling
This commit is contained in:
parent
fe7b4f2ad9
commit
7d9b839f9c
7 changed files with 54 additions and 39 deletions
|
|
@ -701,10 +701,9 @@ impl flags::AnalysisStats {
|
|||
|
||||
if self.parallel {
|
||||
let mut inference_sw = self.stop_watch();
|
||||
let snap = db.snapshot();
|
||||
bodies
|
||||
.par_iter()
|
||||
.map_with(snap, |snap, &body| {
|
||||
.map_with(db.clone(), |snap, &body| {
|
||||
snap.body(body.into());
|
||||
snap.infer(body.into());
|
||||
})
|
||||
|
|
|
|||
|
|
@ -126,10 +126,8 @@ impl CargoParser<DiscoverProjectMessage> for DiscoverProjectParser {
|
|||
Some(msg)
|
||||
}
|
||||
Err(err) => {
|
||||
let err = DiscoverProjectData::Error {
|
||||
error: format!("{:#?}\n{}", err, line),
|
||||
source: None,
|
||||
};
|
||||
let err =
|
||||
DiscoverProjectData::Error { error: format!("{err:#?}\n{line}"), source: None };
|
||||
Some(DiscoverProjectMessage::new(err))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue