diff options
author | Aleksey Kladov <[email protected]> | 2021-04-06 16:08:05 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-04-06 16:08:05 +0100 |
commit | de3370278468e5135e4990fc14562e5ce523ef37 (patch) | |
tree | bd433d92a1a44b9b5bc7a6603b7862ed47c3937b /crates/stdx | |
parent | 9ec5e6e4fdbe893f38d10dbdc609284368efdb64 (diff) |
feat: show errors from `cargo metadata` and initial `cargo check` in the status bar
closes #3155
Diffstat (limited to 'crates/stdx')
-rw-r--r-- | crates/stdx/src/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/stdx/src/lib.rs b/crates/stdx/src/lib.rs index d26be4853..b0a18d58d 100644 --- a/crates/stdx/src/lib.rs +++ b/crates/stdx/src/lib.rs | |||
@@ -178,6 +178,7 @@ where | |||
178 | start..start + len | 178 | start..start + len |
179 | } | 179 | } |
180 | 180 | ||
181 | #[repr(transparent)] | ||
181 | pub struct JodChild(pub process::Child); | 182 | pub struct JodChild(pub process::Child); |
182 | 183 | ||
183 | impl ops::Deref for JodChild { | 184 | impl ops::Deref for JodChild { |
@@ -200,6 +201,13 @@ impl Drop for JodChild { | |||
200 | } | 201 | } |
201 | } | 202 | } |
202 | 203 | ||
204 | impl JodChild { | ||
205 | pub fn into_inner(self) -> process::Child { | ||
206 | // SAFETY: repr transparent | ||
207 | unsafe { std::mem::transmute::<JodChild, process::Child>(self) } | ||
208 | } | ||
209 | } | ||
210 | |||
203 | #[cfg(test)] | 211 | #[cfg(test)] |
204 | mod tests { | 212 | mod tests { |
205 | use super::*; | 213 | use super::*; |