Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/flycheck/src/lib.rs')
| -rw-r--r-- | crates/flycheck/src/lib.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/flycheck/src/lib.rs b/crates/flycheck/src/lib.rs index 40dfe6f511..0661d776f1 100644 --- a/crates/flycheck/src/lib.rs +++ b/crates/flycheck/src/lib.rs @@ -179,7 +179,7 @@ impl FlycheckActor { tracing::error!( "Flycheck failed to run the following command: {:?}", self.check_command() - ) + ); } self.progress(Progress::DidFinish(res)); } @@ -253,14 +253,14 @@ impl FlycheckActor { } fn send(&self, check_task: Message) { - (self.sender)(check_task) + (self.sender)(check_task); } } struct CargoHandle { child: JodChild, #[allow(unused)] - thread: jod_thread::JoinHandle<io::Result<bool>>, + thread: jod_thread::JoinHandle<bool>, receiver: Receiver<CargoMessage>, } @@ -279,7 +279,7 @@ impl CargoHandle { // It is okay to ignore the result, as it only errors if the process is already dead let _ = self.child.kill(); let exit_status = self.child.wait()?; - let read_at_least_one_message = self.thread.join()?; + let read_at_least_one_message = self.thread.join(); if !exit_status.success() && !read_at_least_one_message { // FIXME: Read the stderr to display the reason, see `read2()` reference in PR comment: // https://github.com/rust-analyzer/rust-analyzer/pull/3632#discussion_r395605298 @@ -304,7 +304,7 @@ impl CargoActor { fn new(child_stdout: process::ChildStdout, sender: Sender<CargoMessage>) -> CargoActor { CargoActor { child_stdout, sender } } - fn run(self) -> io::Result<bool> { + fn run(self) -> bool { // We manually read a line at a time, instead of using serde's // stream deserializers, because the deserializer cannot recover // from an error, resulting in it getting stuck, because we try to @@ -334,20 +334,20 @@ impl CargoActor { // Skip certain kinds of messages to only spend time on what's useful JsonMessage::Cargo(message) => match message { cargo_metadata::Message::CompilerArtifact(artifact) if !artifact.fresh => { - self.sender.send(CargoMessage::CompilerArtifact(artifact)).unwrap() + self.sender.send(CargoMessage::CompilerArtifact(artifact)).unwrap(); } cargo_metadata::Message::CompilerMessage(msg) => { - self.sender.send(CargoMessage::Diagnostic(msg.message)).unwrap() + self.sender.send(CargoMessage::Diagnostic(msg.message)).unwrap(); } _ => (), }, JsonMessage::Rustc(message) => { - self.sender.send(CargoMessage::Diagnostic(message)).unwrap() + self.sender.send(CargoMessage::Diagnostic(message)).unwrap(); } } } } - Ok(read_at_least_one_message) + read_at_least_one_message } } |