diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-16 14:44:24 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-16 14:44:24 +0100 |
commit | 1216878f7be20dd0e652fb8cdc395009fdcfae07 (patch) | |
tree | 6551967cc8c6e921b66071453ad7888a9121d326 /crates/ra_analysis/src/job.rs | |
parent | 39cb6c6d3f78b193f5873c3492e530bbd24d5dd2 (diff) | |
parent | 61f3a438d3a729a6be941bca1ff4c6a97a33f221 (diff) |
Merge #134
134: Cargo Format run r=kjeremy a=kjeremy
I'm not sure how appreciated this is but I figured I would run `cargo fmt` and see what came up.
I made sure that `cargo test` still passes.
Co-authored-by: Jeremy A. Kolb <[email protected]>
Diffstat (limited to 'crates/ra_analysis/src/job.rs')
-rw-r--r-- | crates/ra_analysis/src/job.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/crates/ra_analysis/src/job.rs b/crates/ra_analysis/src/job.rs index ea1652a26..2871f9839 100644 --- a/crates/ra_analysis/src/job.rs +++ b/crates/ra_analysis/src/job.rs | |||
@@ -14,15 +14,20 @@ impl JobHandle { | |||
14 | pub fn new() -> (JobHandle, JobToken) { | 14 | pub fn new() -> (JobHandle, JobToken) { |
15 | let (sender_alive, receiver_alive) = bounded(0); | 15 | let (sender_alive, receiver_alive) = bounded(0); |
16 | let (sender_canceled, receiver_canceled) = bounded(0); | 16 | let (sender_canceled, receiver_canceled) = bounded(0); |
17 | let token = JobToken { _job_alive: sender_alive, job_canceled: receiver_canceled }; | 17 | let token = JobToken { |
18 | let handle = JobHandle { job_alive: receiver_alive, _job_canceled: sender_canceled }; | 18 | _job_alive: sender_alive, |
19 | job_canceled: receiver_canceled, | ||
20 | }; | ||
21 | let handle = JobHandle { | ||
22 | job_alive: receiver_alive, | ||
23 | _job_canceled: sender_canceled, | ||
24 | }; | ||
19 | (handle, token) | 25 | (handle, token) |
20 | } | 26 | } |
21 | pub fn has_completed(&self) -> bool { | 27 | pub fn has_completed(&self) -> bool { |
22 | is_closed(&self.job_alive) | 28 | is_closed(&self.job_alive) |
23 | } | 29 | } |
24 | pub fn cancel(self) { | 30 | pub fn cancel(self) {} |
25 | } | ||
26 | } | 31 | } |
27 | 32 | ||
28 | impl JobToken { | 33 | impl JobToken { |
@@ -31,7 +36,6 @@ impl JobToken { | |||
31 | } | 36 | } |
32 | } | 37 | } |
33 | 38 | ||
34 | |||
35 | // We don't actually send messages through the channels, | 39 | // We don't actually send messages through the channels, |
36 | // and instead just check if the channel is closed, | 40 | // and instead just check if the channel is closed, |
37 | // so we use uninhabited enum as a message type | 41 | // so we use uninhabited enum as a message type |