aboutsummaryrefslogtreecommitdiff
path: root/crates/stdx
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-06 16:09:38 +0100
committerGitHub <[email protected]>2021-04-06 16:09:38 +0100
commit74711deb724e0a6c84a221bfdfa15eaedbdb2300 (patch)
tree4ac4d3965dd7aca499b8f3bcbf0a80a37a755a66 /crates/stdx
parent8e768a5a1f83bd0531835687d703ddec85446f8c (diff)
parentde3370278468e5135e4990fc14562e5ce523ef37 (diff)
Merge #8375
8375: feat: show errors from `cargo metadata` and initial `cargo check` in the status bar r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/stdx')
-rw-r--r--crates/stdx/src/lib.rs8
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)]
181pub struct JodChild(pub process::Child); 182pub struct JodChild(pub process::Child);
182 183
183impl ops::Deref for JodChild { 184impl ops::Deref for JodChild {
@@ -200,6 +201,13 @@ impl Drop for JodChild {
200 } 201 }
201} 202}
202 203
204impl 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)]
204mod tests { 212mod tests {
205 use super::*; 213 use super::*;