From de3370278468e5135e4990fc14562e5ce523ef37 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 6 Apr 2021 18:08:05 +0300 Subject: feat: show errors from `cargo metadata` and initial `cargo check` in the status bar closes #3155 --- crates/stdx/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'crates/stdx') 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 start..start + len } +#[repr(transparent)] pub struct JodChild(pub process::Child); impl ops::Deref for JodChild { @@ -200,6 +201,13 @@ impl Drop for JodChild { } } +impl JodChild { + pub fn into_inner(self) -> process::Child { + // SAFETY: repr transparent + unsafe { std::mem::transmute::(self) } + } +} + #[cfg(test)] mod tests { use super::*; -- cgit v1.2.3