diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-07 18:07:01 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-07 18:07:01 +0000 |
commit | 4ddf075673c4a8e3b5b0be5a2f085cdefe3993ef (patch) | |
tree | ddf9095806ebde252404da0c85946f4778e6aae9 /crates/flycheck/src | |
parent | c29d35362389395ea2b40fc863c70c8597137e52 (diff) | |
parent | 2b2d699b35d69375def80fe51c6a8c3bfbe53828 (diff) |
Merge #7193
7193: Show progress for fetching workspace (cargo-metadata and loadOutDirsFromCheck) r=matklad a=edwin0cheng
![Peek 2021-01-07 21-57](https://user-images.githubusercontent.com/11014119/103902132-0db4c780-5135-11eb-94d3-32429445be87.gif)
Fixes #7188
Fixes #3300
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/flycheck/src')
-rw-r--r-- | crates/flycheck/src/lib.rs | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/crates/flycheck/src/lib.rs b/crates/flycheck/src/lib.rs index d982c5f29..4388e8c67 100644 --- a/crates/flycheck/src/lib.rs +++ b/crates/flycheck/src/lib.rs | |||
@@ -5,13 +5,13 @@ | |||
5 | use std::{ | 5 | use std::{ |
6 | fmt, | 6 | fmt, |
7 | io::{self, BufReader}, | 7 | io::{self, BufReader}, |
8 | ops, | ||
9 | path::PathBuf, | 8 | path::PathBuf, |
10 | process::{self, Command, Stdio}, | 9 | process::{self, Command, Stdio}, |
11 | time::Duration, | 10 | time::Duration, |
12 | }; | 11 | }; |
13 | 12 | ||
14 | use crossbeam_channel::{never, select, unbounded, Receiver, Sender}; | 13 | use crossbeam_channel::{never, select, unbounded, Receiver, Sender}; |
14 | use stdx::JodChild; | ||
15 | 15 | ||
16 | pub use cargo_metadata::diagnostic::{ | 16 | pub use cargo_metadata::diagnostic::{ |
17 | Applicability, Diagnostic, DiagnosticCode, DiagnosticLevel, DiagnosticSpan, | 17 | Applicability, Diagnostic, DiagnosticCode, DiagnosticLevel, DiagnosticSpan, |
@@ -323,24 +323,3 @@ impl CargoActor { | |||
323 | Ok(read_at_least_one_message) | 323 | Ok(read_at_least_one_message) |
324 | } | 324 | } |
325 | } | 325 | } |
326 | |||
327 | struct JodChild(process::Child); | ||
328 | |||
329 | impl ops::Deref for JodChild { | ||
330 | type Target = process::Child; | ||
331 | fn deref(&self) -> &process::Child { | ||
332 | &self.0 | ||
333 | } | ||
334 | } | ||
335 | |||
336 | impl ops::DerefMut for JodChild { | ||
337 | fn deref_mut(&mut self) -> &mut process::Child { | ||
338 | &mut self.0 | ||
339 | } | ||
340 | } | ||
341 | |||
342 | impl Drop for JodChild { | ||
343 | fn drop(&mut self) { | ||
344 | let _ = self.0.kill(); | ||
345 | } | ||
346 | } | ||