mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Adds "restart server" command
This commit is contained in:
parent
546d9be2a7
commit
12f28f6276
4 changed files with 24 additions and 7 deletions
|
@ -37,11 +37,9 @@ pub struct Threads {
|
|||
}
|
||||
|
||||
impl Threads {
|
||||
pub fn join(self) -> Result<()> {
|
||||
match self.reader.join() {
|
||||
Ok(r) => r?,
|
||||
Err(_) => bail!("reader panicked"),
|
||||
}
|
||||
pub fn exit(self) -> Result<()> {
|
||||
// We can't rely on stdin being closed
|
||||
drop(self.reader);
|
||||
match self.writer.join() {
|
||||
Ok(r) => r,
|
||||
Err(_) => bail!("writer panicked"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue