mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
feat: Only flycheck workspace that belongs to saved file
This commit is contained in:
parent
ea416175d5
commit
a63b5d3c84
3 changed files with 70 additions and 7 deletions
|
@ -55,6 +55,7 @@ pub struct FlycheckHandle {
|
|||
// XXX: drop order is significant
|
||||
sender: Sender<Restart>,
|
||||
_thread: jod_thread::JoinHandle,
|
||||
id: usize,
|
||||
}
|
||||
|
||||
impl FlycheckHandle {
|
||||
|
@ -70,13 +71,17 @@ impl FlycheckHandle {
|
|||
.name("Flycheck".to_owned())
|
||||
.spawn(move || actor.run(receiver))
|
||||
.expect("failed to spawn thread");
|
||||
FlycheckHandle { sender, _thread: thread }
|
||||
FlycheckHandle { id, sender, _thread: thread }
|
||||
}
|
||||
|
||||
/// Schedule a re-start of the cargo check worker.
|
||||
pub fn update(&self) {
|
||||
self.sender.send(Restart).unwrap();
|
||||
}
|
||||
|
||||
pub fn id(&self) -> usize {
|
||||
self.id
|
||||
}
|
||||
}
|
||||
|
||||
pub enum Message {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue